Greasy Fork

Contenido premium el mercurio

Permite leer contenido pagado en el mercurio

// ==UserScript==
// @name         Contenido premium el mercurio
// @namespace    http://tampermonkey.net/
// @version      1.0
// @license MIT
// @description  Permite leer contenido pagado en el mercurio
// @include      *digital.elmercurio.com/*
// @grant         GM_addStyle
// ==/UserScript==


    (function () {
        document.cookie = "socialReferrer=null";
        document.cookie = "T=null";


        if (getCookie("ActivePDF") == "") {
            window.location.reload();
            document.cookie = "ActivePDF=active";
        }
    }());


function getCookie(cname) {
    let name = cname + "=";
    let decodedCookie = decodeURIComponent(document.cookie);
    let ca = decodedCookie.split(';');
    for (let i = 0; i < ca.length; i++) {
        let c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}