The New York Times Paywall Bypass

Removes paywalls when trying to view content on The New York Times

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name The New York Times Paywall Bypass
// @namespace https://joshcantco.de
// @version 1.2.0
// @description Removes paywalls when trying to view content on The New York Times
// @author Joshua Fountain
// @license GPL-3.0-or-later
// @grant GM_addStyle
// @run-at document-start
// @include /^(?:^http.://www.nytimes.com/\d{4}\/.*)$/
// @include https://www.nytimes.com/slideshow*
// @include https://www.nytimes.com/live*
// @include https://www.nytimes.com/interactive*
// ==/UserScript==

(function() {
    let css = `
        #app > div > div:not([id]), #site-content {
            position: static !important;
        }
        #gateway-content, #standalone-header, #app > div > div:first-child > div:last-child {
            display: none;
        }
    `;
    if (typeof GM_addStyle !== "undefined") {
        GM_addStyle(css);
    } else {
        let styleNode = document.createElement("style");
        styleNode.appendChild(document.createTextNode(css));
        (document.querySelector("head") || document.documentElement).appendChild(styleNode);
    }
})();