Full Screen

For all website. ctrl + alt + F

目前为 2022-02-12 提交的版本。查看 最新版本

// ==UserScript==
// @name         Full Screen
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  For all website. ctrl + alt + F
// @author       Rafif Adli Mulya
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var x=document;
    function fa(n){x.documentElement.setAttribute('rfullscreen',n)}
    function fs(m){
      if(m.getAttribute('rfullscreen')=='f'){
         if(m.requestFullscreen){m.requestFullscreen()}
         else if(m.webkitRequestFullscreen){m.webkitRequestFullscreen()}
         else if(m.msRequestFullscreen){m.msRequestFullscreen()}
         else if(m.mozRequestFullscreen){m.mozRequestFullscreen()}
         else{alert('Full Screen not supported on this Browser')}
         fa('t')
     }else{
         if(x.exitFullscreen){x.exitFullscreen()}
         else if(x.webkitExitFullscreen){x.webkitExitFullscreen()}
         else if(x.msExitFullscreen){x.msExitFullscreen()}
         else if(x.mozExitFullscreen){x.mozExitFullscreen()}
         else{alert('not supported! try press "ESC" key')}
         fa('f')
     }
    }
    fa('f');
    x.onkeyup=(e)=>{if(e.ctrlKey&&e.altKey&&e.which==70){fs(x.documentElement)}};
    x.ondblclick=()=>{fs(x.documentElement)}
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址