Last active
March 18, 2023 05:29
-
-
Save andelf/848a6c258da9a63a00a4bf35c1195ca5 to your computer and use it in GitHub Desktop.
Remove eb-watermark, copy and paste to dev-console
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
(function () { | |
function removeWatermark() { | |
const watermark = document.getElementById('eb-watermark'); | |
if (watermark) { | |
watermark.remove(); | |
console.log('eb-watermark removed!'); | |
} | |
} | |
function observeDOM(targetNode, callback) { | |
const observer = new MutationObserver((mutationsList, observer) => { | |
for (const mutation of mutationsList) { | |
if (mutation.type === 'childList') { | |
callback(); | |
} | |
} | |
}); | |
observer.observe(targetNode, { | |
attributes: true, | |
childList: true, | |
subtree: true | |
}); | |
} | |
removeWatermark(); | |
observeDOM(document.body, removeWatermark); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment