抖音一键清屏

//抖音一键清屏

目前为 2023-07-10 提交的版本。查看 最新版本

// ==UserScript==
// @name         抖音一键清屏
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  //抖音一键清屏
// @author       梦呓萤殇
// @match        https://www.douyin.com/*
// @icon         https://lf1-cdn-tos.bytegoofy.com/goofy/ies/douyin_web/public/favicon.ico
// @grant        none
// ==/UserScript==

(function() {
    var qingping = document.getElementsByClassName('xg-switch');
    var wei = "xg-switch"; // 未清屏状态
    var wei1 = "xg-switch xg-switch-checked"; // 清屏状态
    var isCleared = false;

    setInterval(function() {
        clearScreen();
    }, 150);

    function clearScreen() {
        try {
            if (qingping.length > 0 && qingping[0].className == wei) {
                qingping[0].click();
                console.log("清屏了");
                isCleared = true;
            } else if (qingping.length > 0 && qingping[0].className == wei1) {
                if (isCleared) {
                    console.log("已清屏");
                    isCleared = false;
                }
            }
        } catch (error) {
            console.error("清屏操作时出现错误:", error);
        }
    }
})();

QingJ © 2025

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