HS Paywall Remover

Removes HS paywall

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        HS Paywall Remover
// @namespace   HS.paywall.remover
// @description Removes HS paywall
// @author      Martti Natunen
// @include     http://www.hs.fi
// @include     http://www.hs.fi/*
// @include     https://www.hs.fi/*
// @include     https://www.hs.fi
// @include     https://*.hs.fi
// @include     https://*.hs.fi/*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// @version     1.6
// @license     MIT
// @grant       metadata
// @run-at      document-end
// ==/UserScript==

$(document).ready(function(){
    function GM_main () {
        window.onunload = function(){
            window.hs = null; localStorage.clear = Storage.prototype.clear;
            localStorage.clear();
            document.cookie.split(";").forEach(function(c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });
        };
    }
    
    // From http://stackoverflow.com/a/13734859
    addJS_Node (null, null, GM_main);

    function addJS_Node (text, s_URL, funcToRun, runOnLoad)
    {
        var D = document;
        var scriptNode = D.createElement ('script');
        
        if (runOnLoad)
            scriptNode.addEventListener ("load", runOnLoad, false);
        
        scriptNode.type = "text/javascript";
        
        if (text)
            scriptNode.textContent = text;
        
        if (s_URL)
            scriptNode.src = s_URL;
        
        if (funcToRun)
            scriptNode.textContent = '(' + funcToRun.toString() + ')()';

        var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
        
        targ.appendChild (scriptNode);
    }
    
    $('body').append('<div style="position:fixed;bottom:7px;right:7px;z-index:99999;color:#27AE60;" href="#">Done</div>');
});