/**
 * 退出全屏显示
 */
function exitFullscreen() {
  var exitMethod = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen;

  if (exitMethod) {
    exitMethod.call(document);
  } else if (window.ActiveXObject) {
    // eslint-disable-next-line
    new ActiveXObject('WScript.Shell').SendKeys('{F11}');
  }
}

export default exitFullscreen;
