Skip to content

Instantly share code, notes, and snippets.

@ONEKENO
Forked from arafathusayn/hidetdo.js
Created December 6, 2019 09:08
Show Gist options
  • Save ONEKENO/411045590c9dd531f6d41b20e89f13e0 to your computer and use it in GitHub Desktop.
Save ONEKENO/411045590c9dd531f6d41b20e89f13e0 to your computer and use it in GitHub Desktop.
Hide Tidio Chat Branding (Old Theme). For new theme, check: https://gist.github.com/arafathusayn/663217f383b02017d20be6ba465959d4
function hideTdo() {
var timer = null;
var target = document.querySelectorAll('#tidio-chat iframe')[0];
if(!target || typeof target === 'undefined') {
if(timer !== null) {
clearTimeout(timer);
}
timer = setTimeout(hideTdo, 500);
return;
} else {
var timer2 = null;
var tdo = document.querySelectorAll('#tidio-chat iframe')[0].contentWindow.document.querySelectorAll('#root > div > div.online > div.input-wrapper > a.powered')[0];
if(!tdo || typeof tdo === 'undefined') {
if(timer2 !== null) {
clearTimeout(timer2);
}
timer2 = setTimeout(hideTdo, 1);
return;
}
document.querySelectorAll('#tidio-chat iframe')[0].contentWindow.document.querySelectorAll('#root > div > div.online > div.input-wrapper > a.powered')[0].style.display = 'none';
return true;
}
}
hideTdo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment