Created
June 25, 2015 21:37
-
-
Save isoteemu/3ad6ada0c18cd8cb283d to your computer and use it in GitHub Desktop.
Remove paywall from helsingin sanomat / hs.fi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name hs.fi paywall resetter | |
// @namespace maksumuuri | |
// @include http://www.hs.fi/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Helsinginsanomat Paywall resetting | |
* They override localStorage.removeItem to prevent removing items from localStorage. | |
* This breakpoint function even seems to contain home calling function to report overtly | |
* smart people. | |
* And then they save localstorage items on initial load to anonymous function, and use | |
* every second running timer to restore localStorage contents from that anonymous function. | |
*/ | |
// Poor design, remove their histore restore function | |
hs.paywall.instance.restore = function() { return false; } | |
// Remove their prototype function to restore native behaviour | |
delete window.localStorage.removeItem; | |
// Remove history from localStorage | |
window.localStorage.removeItem('_hs_hist') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
says here
when i paste this bit of code to the Google Chrome console.