您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Block any content related to the official Rickroll YouTube video while allowing other content
// ==UserScript== // @name Block Official Rickroll Video // @namespace http://tampermonkey.net/ // @version 0.4 // @description Block any content related to the official Rickroll YouTube video while allowing other content // @author You // @match *://*/* // @grant none // ==/UserScript== (function() { 'use strict'; // URL of the specific Rickroll video to block const rickrollUrl = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; // Function to block content related to the Rickroll video function blockRickrollContent() { // Find all anchor tags on the page const links = document.querySelectorAll('a'); links.forEach(link => { if (link.href.includes(rickrollUrl)) { // Block the Rickroll video link link.style.display = 'none'; // Hide the link // Optionally, you can replace the link text // link.textContent = '[Link blocked]'; } }); // Find all iframes on the page const iframes = document.querySelectorAll('iframe'); iframes.forEach(iframe => { if (iframe.src.includes(rickrollUrl)) { // Block the iframe containing the Rickroll video iframe.style.display = 'none'; // Hide the iframe // Optionally, you can replace the iframe content // iframe.src = 'about:blank'; // Clear the iframe source } }); } // Run the function initially blockRickrollContent(); // Observe changes to dynamically loaded content const observer = new MutationObserver(() => { blockRickrollContent(); }); observer.observe(document.body, { childList: true, subtree: true }); // Handle links and iframes added to the DOM after script execution document.addEventListener('DOMContentLoaded', () => { blockRickrollContent(); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址