Created
June 7, 2019 20:40
-
-
Save AfroThundr3007730/06415c8438d8b7d94b3c092c6643708d to your computer and use it in GitHub Desktop.
Attempts to show the non-paywalled version of Wall Street Journal articles
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 Remove WSJ Paywall | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Attempts to show the non-paywalled version of Wall Street Journal articles | |
// @author AfroThundr | |
// @include https://www.wsj.com/articles/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if (document.location.pathname.indexOf('/articles/') > -1 && | |
document.location.search !== '?mod=rsswn') { | |
if (document.location.search !== '') { | |
document.location.replace( | |
document.location.href.replace(/\?.*/, '?mod=rsswn') | |
); | |
} else { | |
document.location.replace( | |
document.location.href.replace(/$/, '?mod=rsswn') | |
); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or perhaps this would suffice: