Skip to content

Instantly share code, notes, and snippets.

@AmreshSinha
Created November 2, 2021 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmreshSinha/32d948c76e23789a33a670bbbe4160e5 to your computer and use it in GitHub Desktop.
Save AmreshSinha/32d948c76e23789a33a670bbbe4160e5 to your computer and use it in GitHub Desktop.
Tampermonkey Script for bypassing The Athletic Site
// ==UserScript==
// @name The Athletic By Passer
// @namespace https://github.com/AmreshSinha/
// @version 0.1
// @description Bypasses The Athletic Premium
// @author AmreshSinha
// @match https://theathletic.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_addStyle
// @require http://code.jquery.com/jquery-latest.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
console.log("Starting the Script!");
waitForKeyElements (".scroll-lock-overlay", scrollLockOverlay);
waitForKeyElements (".noscroll", removeNoScroll);
waitForKeyElements ("#paywall-container", paywallContainer);
waitForKeyElements (".article-paywalled", removeArticlePaywalled);
function scrollLockOverlay (jNode) {
console.log ("Cleaned node: ", jNode);
jNode.removeClass ("scroll-lock-overlay");
}
function paywallContainer (jNode) {
console.log ("Cleaned node: ", jNode);
jNode.remove ("#paywall-container");
}
function removeNoScroll (jNode) {
console.log ("Cleaned node: ", jNode);
jNode.removeClass ("noscroll");
}
function removeArticlePaywalled (jNode) {
console.log ("Cleaned node: ", jNode);
jNode.remove (".article-paywalled");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment