您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Blocks the reddit event collector
当前为
// ==UserScript== // @name reddit: sabotage event tracker // @namespace mz1js5x0yt0zxq1kf22z1wdn6zq2ij2g // @version 1.0 // @description Blocks the reddit event collector // @match *://*.reddit.com/* // @grant none // @run-at document-start // ==/UserScript== (function() { "use strict"; // Dummy function that just returns true and becomes // 0 or an empty string when type-converted. var dummyFunction = function () { return true; }; dummyFunction.toString = function toString() { return ""; }; dummyFunction[Symbol.toPrimitive] = function (hint) { if (hint === "number") { return 0; } return ""; }; // Trapped constructor. This actually returns // a Proxy of the newly created object function EventTracker(e, t, n, r, i, s, o, u) { if (!this) { return new EventTracker(...arguments); } // Intercept property access. Any unknown prop // is assumed to be a function call, so return // our dummyFunction in response return new Proxy(this, { get: function(target, prop) { if (prop in target) { return target[prop]; } return dummyFunction; } }); } // Prevent extra properties from being added to the prototype Reflect.preventExtensions(EventTracker.prototype); // Export to window in a way that silently prevents it // from being overwritten Reflect.defineProperty(window, "EventTracker", { configurable: false, enumerable: true, set: function (value) {}, // empty setter to prevent overwriting get: function () { return EventTracker; } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址