您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
浏览器右键修改:超链接单击改为在新标签页打开,双击为原右键菜单
当前为
// ==UserScript== // @name Common Right Click Tab // @namespace xiaohuohumax/userscripts/common-right-click-tab // @version 1.0.0 // @author xiaohuohumax // @description 浏览器右键修改:超链接单击改为在新标签页打开,双击为原右键菜单 // @license MIT // @icon https://raw.githubusercontent.com/xiaohuohumax/logo/refs/heads/main/logos/logo.svg // @source https://github.com/xiaohuohumax/userscripts.git // @match http*://*/* // @run-at document-start // @noframes // ==/UserScript== (function () { 'use strict'; const ID = "common-right-click-tab"; const VERSION = "1.0.0"; const THRESHOLD = 300; const CLEANED = 0; let timer = CLEANED; console.log(`${ID}(v${VERSION})`); document.addEventListener("contextmenu", (e) => { if (timer > CLEANED) { clearTimeout(timer); timer = CLEANED; } else { const element = e.target; const link = element.closest("a"); if (link) { e.preventDefault(); timer = setTimeout(() => { timer = CLEANED; window.open(link.href, "_blank"); }, THRESHOLD); } } }); })();