您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
强制飞牛论坛帖子在新标签页打开
// ==UserScript== // @name New Tab on FnClub // @namespace http://tampermonkey.net/ // @version 0.1 // @description 强制飞牛论坛帖子在新标签页打开 // @match *://club.fnnas.com/forum.php* // @match *://club.fnnas.com/thread-*.html* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 直接覆盖掉 atarget,防止它阻止新标签页 window.atarget = function(){}; function fixLinks() { document.querySelectorAll('a[onclick*="atarget"]').forEach(a => { a.setAttribute('target', '_blank'); }); } // 页面初始处理 fixLinks(); // 监听动态加载 new MutationObserver(fixLinks).observe(document.body, { childList: true, subtree: true }); })();