您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Telegraph.co.uk paywall bypass script
// ==UserScript== // @name Telegraph.co.uk paywall bypass // @namespace http://telegraph.co.uk // @version 1.0 // @description Telegraph.co.uk paywall bypass script // @author excitable-tech // @match https://www.telegraph.co.uk/* // @icon https://www.google.com/s2/favicons?sz=64&domain=telegraph.co.uk // @grant unsafeWindow // @run-at document-start // @license MIT // ==/UserScript== (function () { "use strict"; const defineHook = (obj, name, get, set) => { let context = { value: undefined }; if (Object.getOwnPropertyDescriptor(obj, name)?.configurable === false) { return; } Object.defineProperty(obj, name, { enumerable: true, configurable: false, get: () => get(context), set: (value) => set(context, value), }); }; defineHook(unsafeWindow, "martech", (context) => context.value, (context, value) => { context.value = value; defineHook(context.value, "classes", (context) => { Object.keys(context.value) .filter((name) => name.toLowerCase().indexOf("paywall") !== -1) .forEach((name) => delete context.value[name]); return context.value;; }, (context, value) => (context.value = value)); }); })();