Last active
May 11, 2023 19:21
-
-
Save nhunsaker/ace7d92b2c9906b85ef61f94a82f1f3b to your computer and use it in GitHub Desktop.
Wall Jumper
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
// Jump the wall for NYT Recipes | |
// EX: https://cooking.nytimes.com/recipes/1023659-rice-krispie-treats?action=click&module=Tag%20Page%20Recipe%20Card®ion=cookies%20and%20bars&pgType=tag&rank=1 | |
let divs = document.getElementsByTagName('div'); | |
document.body.style.cssText += 'overflow:scroll'; | |
document.body.removeAttribute('class'); | |
for (var i=0, max=divs.length; i<max; i++) { | |
if ( divs[i].className.includes('modal_modal-window-container') ) { | |
divs[i].remove(); | |
} | |
if ( divs[i].id.includes('lire') ) { | |
divs[i].remove(); | |
} | |
} | |
// Jump the wall for NYT Articles | |
// EX: https://www.nytimes.com/2023/01/11/world/europe/russia-ukraine-war-general.html | |
let divs = document.getElementsByTagName('div'); | |
document.body.style.cssText += 'overflow:scroll'; | |
document.getElementById('story').style.cssText += 'z-index:100;background:white;overflow:scroll;height:700px'; | |
document.body.removeAttribute('class'); | |
for (var i=0, max=divs.length; i<max; i++) { | |
if ( divs[i].id.includes('gateway-content') ) { | |
divs[i].remove(); | |
} | |
} | |
document.getElementById('top-wrapper').remove(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment