您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide links with rel="noopener nofollow sponsored"
当前为
// ==UserScript== // @name Hide Promotion Advertisement at Reddit Site // @namespace http://tampermonkey.net/ // @version 1.0.1 // @description Hide links with rel="noopener nofollow sponsored" // @author aspen138 // @match *://*.reddit.com/ // @icon https://www.redditstatic.com/shreddit/assets/favicon/192x192.png // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to hide elements with a specific rel attribute value function hideElementsWithRel() { // Select all <a> elements on the page const links = document.querySelectorAll('a'); // Iterate through all links links.forEach(link => { // Check if the rel attribute matches "noopener nofollow sponsored" if (link.getAttribute('rel') === "noopener nofollow sponsored") { // Hide the element link.style.display = 'none'; } }); } // Run the function on page load hideElementsWithRel(); // Optional: If the page dynamically loads content, you may need to run the function again. // This can be achieved by setting an interval or using MutationObserver for a more advanced solution. })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址