Skip to content

Instantly share code, notes, and snippets.

@codepunkt
Created March 12, 2020 09:28
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 codepunkt/ce925dd3adb913b212182b0d9693a564 to your computer and use it in GitHub Desktop.
Save codepunkt/ce925dd3adb913b212182b0d9693a564 to your computer and use it in GitHub Desktop.
adblock banner delete - work in progress
document.querySelectorAll('*').forEach(el => {
const cs = getComputedStyle(el)
//const zIndex = +cs.zIndex
//const aboveThreshold = zIndex > 100000
if (cs.position === 'fixed') {
console.log(el)
el.style.cssText += ';position:static !important;'
}
if (cs.overflow === 'hidden') {
el.style.cssText += ';overflow:auto !important;'
}
//if (aboveThreshold) {
// console.log(el)
// el.style.display = 'none';
//}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment