您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name music only // @namespace http://tampermonkey.net/ // @include https://www.youtube.com/* // @version 0.69 // @description try to take over the world! // @author tuwuna // @match http://*/* // @grant none // ==/UserScript== setInterval(function() { 'use strict'; let a = document.getElementsByClassName('ytd-rich-grid-video-renderer'); for (let i = a.length - 1; i >= 0; i--) { if (a[i].id != 'dismissable') continue; let s = a[i].children[1].children[1].children[0].children[1].children[0].getAttribute('aria-label'); if (s == null) continue; if (!s.includes(' - ')) a[i].remove(); } a = document.getElementsByClassName('title'); for (let i = 0; i < a.length; i++) { if (a[i].children[0] == undefined) continue; let s = a[i].children[0].innerText; if (typeof s != 'string') continue; console.log(s); if (s.includes(' ')) continue; let sad = document.getElementById('upnext'); if (sad == null) continue; if (sad.innerText == 'Up next' && !s.includes(' - ')) { document.getElementById('content').remove(); } } }, 100);