double-touched to enter fullscreen

I AM THE WORLD

当前为 2025-03-23 提交的版本,查看 最新版本

// ==UserScript==
// @name         double-touched to enter fullscreen
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  I AM THE WORLD
// @author       You
// @match        *://*.douyin.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=douyin.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    window.cnt = 0;
    document.body.remove
    document.body.addEventListener('touchend',()=>{

        if(window.cnt === 0) {
            window.cnt += 1;window.lastTime = Date.now();
        }else if(window.cnt === 1 && Date.now() - window.lastTime <= 300) {
            if(!document.webkitFullscreenElement) {
                document.documentElement.webkitRequestFullScreen();
            }else {
                document.webkitExitFullscreen();
            }
            window.cnt = 0;
        }else {
            window.cnt = 0;
        }


    })
    // Your code here...
})();

QingJ © 2025

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