您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A simple script looking for the pop up of "Are You Still Watching?" and closes it.
// ==UserScript== // @name Are You Still Watching blocker // @namespace http://tampermonkey.net/ // @version 2024-06-08 // @description A simple script looking for the pop up of "Are You Still Watching?" and closes it. // @author IW // @match https://www.youtube.com/watch?v=* // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; const observer = new MutationObserver(() => { if (document.querySelector("[id='confirm-button']")) { document.querySelector("[id='confirm-button']").click(); console.log("Blocked a 'Still listening pop-up'"); } }); observer.observe(document.body, { subtree: true, childList: true, }); console.log("NonStop YT Loaded") })();