Skip to content

Instantly share code, notes, and snippets.

@nhunsaker
Last active May 11, 2023 19:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhunsaker/ace7d92b2c9906b85ef61f94a82f1f3b to your computer and use it in GitHub Desktop.
Save nhunsaker/ace7d92b2c9906b85ef61f94a82f1f3b to your computer and use it in GitHub Desktop.
Wall Jumper
// Jump the wall for NYT Recipes
// EX: https://cooking.nytimes.com/recipes/1023659-rice-krispie-treats?action=click&module=Tag%20Page%20Recipe%20Card&region=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