您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hey YouTube, I'm the one to say what I watch. Fuck you.
// ==UserScript== // @name YouTube Fuck Autoplay // @description Hey YouTube, I'm the one to say what I watch. Fuck you. // @include https://www.youtube.com/* // @version 2 // @grant none // @noframes // @namespace https://greasyfork.runtimutd.eu.org/en/users/175405-anao9aaw/wtf2 // @license MIT // ==/UserScript== function turnOffAutoplay() { var l = document.getElementsByClassName("ytp-button"); var l2 = Array.from(l).filter(e => {return e.dataset.tooltipTargetId == "ytp-autonav-toggle-button";}); console.log(`Seeing ${l2.length} elements: ${l2}`); var e = l2[0]; console.log(e.title); if (e.title.endsWith("on")) { e.click(); console.log(e.title); } } setInterval(turnOffAutoplay, 30 * 1000); // 30 seconds // Can't use setTimeout because apparently the UI doesn't work while the tab isn't active. Ugh!