您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
解除tcpc.org.cn网站对鼠标右键的屏蔽
当前为
// ==UserScript== // @name 解除tcpc.org.cn右键屏蔽 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 解除tcpc.org.cn网站对鼠标右键的屏蔽 // @author loure // @match https://www.tcpc.org.cn/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 禁用右键菜单事件 document.addEventListener('contextmenu', function(e) { e.stopPropagation(); e.stopImmediatePropagation(); }, true); // 禁用选择限制 document.addEventListener('selectstart', function(e) { e.stopPropagation(); e.stopImmediatePropagation(); }, true); // 禁用鼠标按下事件拦截 document.addEventListener('mousedown', function(e) { if (e.button === 2) { // 右键 e.stopPropagation(); e.stopImmediatePropagation(); } }, true); // 移除可能存在的全局事件监听 function removeEventListeners() { ['contextmenu', 'selectstart', 'mousedown', 'mouseup', 'click'].forEach(event => { window[`on${event}`] = null; document[`on${event}`] = null; document.body[`on${event}`] = null; }); } // 页面加载完成后执行 window.addEventListener('load', removeEventListeners); // 处理动态加载的内容 const observer = new MutationObserver(removeEventListeners); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址