您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
To whitelist YouTube channels in uBlock Origin
当前为
// ==UserScript== // @name YouTube - whitelist channels in uBlock Origin // @namespace https://github.com/gorhill/uBlock // @version 1.1 // @description To whitelist YouTube channels in uBlock Origin // @author Raymond Hill (gorhill) // @match https://*.youtube.com/* // @grant none // @license http://creativecommons.org/licenses/by-sa/4.0/ // @supportURL https://github.com/gorhill/uBlock/issues // ==/UserScript== // First page load // var exposeUserInURL = function() { 'use strict'; var link = document.querySelector('link[href*="/user/"]'); if ( link === null ) { return; } var pos = link.href.lastIndexOf('/'); if ( pos === -1 ) { return; } var arg = 'user=' + link.href.slice(pos + 1); if ( location.search === '' ) { location.replace(location.href + '?' + arg); return; } if ( location.href.indexOf(arg) === -1 ) { location.replace(location.href + '&' + arg); return; } }; exposeUserInURL(); // DOM modifications // var mutationHandlerTimer = null; var mutationHandlerAsync = function() { 'use strict'; mutationHandlerTimer = null; exposeUserInURL(); }; var mutationHandler = function(mutations) { 'use strict'; if ( mutationHandlerTimer !== null ) { return; } for ( var i = 0; i < mutations.length; i++ ) { if ( mutations[i].addedNodes ) { mutationHandlerTimer = setTimeout(mutationHandlerAsync, 1); break; } } }; var observer = new MutationObserver(mutationHandler); observer.observe(document.body, { childList: true, subtree: true });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址