您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
shows the premium article without a subscription
// ==UserScript== // @name ShowsObservadorPtPremiumArticles // @namespace http://tampermonkey.net/ // @version 0.1 // @description shows the premium article without a subscription // @author You // @match https://observador.pt/* // @icon https://www.google.com/s2/favicons?domain=observador.pt // @grant none // ==/UserScript== (function () { "use strict"; function showContent() { if (!window.contextualData) { console.error("contextualData has not found"); return; } Object.defineProperty(window.contextualData, "premium", { value: 1, writable: false, }); // Disable support to ajax navigation //window.contextualData.jsConfig.disableAjaxNavigation = true; document.body.classList.remove("premium-article", "free-user"); document.body.classList.add("article-shown"); document.querySelector("article").shown = !0; document.querySelector(".article-body-wrapper").style.maxHeight = ""; document.querySelector(".article-body-wrapper").style.overflow = ""; jQuery(".piano-article-blocker").hide(); } showContent(); if (!window.contextualData.jsConfig.disableAjaxNavigation) { const observer = new MutationObserver(showContent); observer.observe(document.querySelector("main"), { childList: true, attributes: false, subtree: false, }); } })();