您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Blocks the reddit event collector
当前为
// ==UserScript== // @name reddit: sabotage event tracker // @namespace mz1js5x0yt0zxq1kf22z1wdn6zq2ij2g // @version 1.1 // @description Blocks the reddit event collector // @match *://*.reddit.com/* // @grant none // @run-at document-start // ==/UserScript== (function() { "use strict"; var realSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader; var realSend = XMLHttpRequest.prototype.send; var sigHeaderDetected = Symbol(); // Hook this function to see if the suspect header is being set XMLHttpRequest.prototype.setRequestHeader = function setRequestHeader(header, value) { var foundHeader = false; header = String(header).toLowerCase(); if (header.startsWith("x-signature")) { foundHeader = true; } else if (window.r && r.config) { if ((r.config.signature_header && String(r.config.signature_header).toLowerCase() === header) || (r.config.signature_header_v2 && String(r.config.signature_header_v2).toLowerCase() === header) ) { foundHeader = true; } } // Tag this object so we can block the send() call later if (foundHeader) { Reflect.defineProperty(this, sigHeaderDetected, { enumerable: true, configurable: false, writable: false, value: true }); } return realSetRequestHeader.apply(this, arguments); }; // Only allow sending if we did not detect the signature header XMLHttpRequest.prototype.send = function send(body) { if (sigHeaderDetected in this) { // nope this.abort(); } else { return realSend.apply(this, arguments); } }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址