Created
June 29, 2021 02:16
-
-
Save Rakeshbagri/e304550db635d9fbc3fa29fb7c259fb1 to your computer and use it in GitHub Desktop.
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 hideTdo() { | |
var timer = null; | |
var target = document.querySelector('#tidio-chat iframe'); | |
if(!target) { | |
if(timer !== null) { | |
clearTimeout(timer); | |
} | |
timer = setTimeout(hideTdo, 500); | |
return; | |
} else { | |
var timer2 = null; | |
var tdo = document.querySelector('#tidio-chat iframe') | |
.contentDocument | |
.querySelector('a[href*="tidio.com/powered"]'); | |
if(!tdo) { | |
if(timer2 !== null) { | |
clearTimeout(timer2); | |
} | |
timer2 = setTimeout(hideTdo, 1); | |
return; | |
} | |
document.querySelector('#tidio-chat iframe') | |
.contentDocument | |
.querySelector('a[href*="tidio.com/powered"]') | |
.remove(); | |
return true; | |
} | |
} | |
hideTdo(); | |
setInterval(hideTdo, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment