AUTO FULLSCREEN/REFLASH

自动全屏及刷新CY页面

当前为 2021-04-20 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         AUTO FULLSCREEN/REFLASH
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  自动全屏及刷新CY页面
// @author       Ind4V
// @match        *://www.h3yun.com/*
// @grant        none
// ==/UserScript==
setTimeout(function () {
    // 延迟执行事件


  // 判断各种浏览器,找到正确的方法
  function launchFullscreen(element) {
    if(element.requestFullscreen) {
      element.requestFullscreen();
    } else if(element.mozRequestFullScreen) {
      element.mozRequestFullScreen();
    } else if(element.webkitRequestFullscreen) {
      element.webkitRequestFullscreen();
    } else if(element.msRequestFullscreen) {
      element.msRequestFullscreen();
    }
  }
  // 判断浏览器种类
  function exitFullscreen() {
    if(document.exitFullscreen) {
      document.exitFullscreen();
    } else if(document.mozCancelFullScreen) {
      document.mozCancelFullScreen();
    } else if(document.webkitExitFullscreen) {
      document.webkitExitFullscreen();
    }
  }


//判断浏览器是否全屏
function f_IsFullScreen() {
return (document.body.scrollHeight == window.screen.height && document.body.scrollWidth == window.screen.width);
}


//设置浏览器全屏
function f_SetFullScreen() {
//如果浏览器不是全屏则将其设置为全屏模式
if (!f_IsFullScreen()) {
    launchFullscreen(document.documentElement);
return false;
}

}

f_SetFullScreen()
}, 1500);
setTimeout(function () {
    // 延迟执行事件
location.reload();
}, 600000);