La Repubblica "Rep" Paywall Bypass

Unhides the "paywalled" articles on Rep.

Versión del día 07/12/2018. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name                La Repubblica "Rep" Paywall Bypass
// @name:it             La Repubblica "Rep" Paywall Bypass
// @namespace           LucciUserJS
// @version             1.2
// @description         Unhides the "paywalled" articles on Rep.
// @description:it      Rimuove il paywall su Rep, gli articoli premium de la Repubblica.
// @author              Lucci <[email protected]>, Andrea Lazzarotto
// @match               https://rep.repubblica.it/*
// @run-at              document-start
// @grant               none
// @license             GPL version 3 or any later version http://www.gnu.org/copyleft/gpl.html
// ==/UserScript==

function GM_addStyle(css) {
    const head = document.getElementsByTagName('head')[0]
    if (!head) return
    let style = document.createElement('style')
    style.type = 'text/css'
    style.innerHTML = css
    head.appendChild(style)
}

(function () {
    'use strict'

    GM_addStyle(
        `
        div.detail-article_body > div:not(.paywall) {
            display: none !important
        }
        .paywall {
            display: block !important
        }
        `
    )
    setInterval(
        () => {
            if (location.href.indexOf("/pwa/") > 0) {
                location.href = location.href.replace("/pwa/", "/ws/detail/")
            }
        },
        1000
    )
    window.dispatchEvent(new Event('resize'))
})()
长期地址
遇到问题?请前往 GitHub 提 Issues。