fか[で全画面化

Firefoxで全画面化のアラートを消すにはabout:config→full-screen-api.warning.timeout→-1

Instalează acest script?
Script sugerat de autor

Poate îți va plăcea și画像のホバーで拡大.

Instalează acest script
// ==UserScript==
// @name fか[で全画面化
// @description Firefoxで全画面化のアラートを消すにはabout:config→full-screen-api.warning.timeout→-1
// @match *://*/*
// @grant none
// @version 0.1.2
// @namespace https://greasyfork.org/users/181558
// ==/UserScript==

(function() {
  document.addEventListener('keydown', function(e) {
    if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA' || e.target.isContentEditable || ((e.target.closest('#chat-messages,ytd-comments-header-renderer') || document.activeElement.closest('#chat-messages,ytd-comments-header-renderer')))) return;
    if (/www\.youtube\.com\/watch/.test(location.href) && e.key === "[") return;
    if (!e.getModifierState("Alt") && !e.getModifierState("Control") && !e.getModifierState("Shift") && (e.key === "f" || e.key === "[")) { // f [ 全画面化

      toggleFullScreen();
      return false;

      function toggleFullScreen() {
        if (!document.fullscreenElement) {
          let p = document.documentElement.requestFullscreen();
          p.catch(() => {});
        } else {
          if (document.exitFullscreen) {
            let p = document.exitFullscreen();
            p.catch(() => {});
          }
        }
      }
    }
  }, false);
})();