Skip to content

Instantly share code, notes, and snippets.

@kjbrum
Last active April 27, 2020 16:30
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 kjbrum/b52cfa588e7131d7859f603f25590907 to your computer and use it in GitHub Desktop.
Save kjbrum/b52cfa588e7131d7859f603f25590907 to your computer and use it in GitHub Desktop.
Scripts for removing popups
document.querySelector('.tp-modal').outerHTML = '';
document.querySelector('.tp-backdrop').outerHTML = '';
document.body.className = document.body.className.replace('tp-modal-open', '');
document.querySelector('#overlayParent').outerHTML = '';
document.querySelector('#overlayMask').outerHTML = '';
var css = document.createElement('style');
css.type = 'text/css';
css.textContent = `
.standard-body > .content-lede-image, .standard-body > .standard-body-content > *:not(.breaker-ad):not(.vertical-ad), .article-container > .article-body > *:not(.breaker-ad):not(.vertical-ad), .slideshow-inner > .slideshow-lede > *:not(.breaker-ad):not(.vertical-ad), .listicle-body >.content-lede-image, .listicle-intro, .listicle-body-content > .listicle-slide, .recipe-container > .recipe-body > *:not(.breaker-ad):not(.vertical-ad) {
filter: none !important;
pointer-events: initial !important;
user-select: auto !important;
}
.piano-container-wrapper {
display: none !important;
}
`;
document.documentElement.appendChild(css);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment