Skip to content

Instantly share code, notes, and snippets.

@andelf
Last active March 18, 2023 05:29
Show Gist options
  • Save andelf/848a6c258da9a63a00a4bf35c1195ca5 to your computer and use it in GitHub Desktop.
Save andelf/848a6c258da9a63a00a4bf35c1195ca5 to your computer and use it in GitHub Desktop.
Remove eb-watermark, copy and paste to dev-console
(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