Skip to content

Instantly share code, notes, and snippets.

@3m1n3nc3
Last active March 22, 2024 06:02
Show Gist options
  • Save 3m1n3nc3/41cc4d310afe6b07b53521350e8db8e2 to your computer and use it in GitHub Desktop.
Save 3m1n3nc3/41cc4d310afe6b07b53521350e8db8e2 to your computer and use it in GitHub Desktop.
Remove google translate branding
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