Last active
March 22, 2024 06:02
-
-
Save 3m1n3nc3/41cc4d310afe6b07b53521350e8db8e2 to your computer and use it in GitHub Desktop.
Remove google translate branding
This file contains hidden or 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
addEventListener("DOMContentLoaded", (event) => { | |
const rmIt = setInterval(function() { | |
if (rmGTB()) clearInterval(rmIt) | |
}, 100) | |
}); | |
function rmGTB() { | |
const gadg = document.querySelector('.goog-te-gadget') | |
if (gadg) { | |
const el = gadg.childNodes[0]; | |
while (gadg.firstChild) { | |
gadg.removeChild(gadg.firstChild); | |
} | |
gadg.appendChild(el) | |
} | |
return gadg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment