-
-
Save arafathusayn/ba49ff4f8d49a427aaf73acb78061978 to your computer and use it in GitHub Desktop.
| 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); |
Hello..
After adding the function to hide tidio logo in bot im unable to see URL links in conversations, Its hiding URL links after adding this code along with logo.....What i have to do plz help..
below one is far better
(function() {
function onTidioChatApiReady() {
document.querySelector('#tidio-chat iframe').contentDocument.querySelector('a[target=_blank]').remove();
}
if (window.tidioChatApi) {
window.tidioChatApi.on("open", onTidioChatApiReady);
} else {
document.addEventListener("tidioChat-open", onTidioChatApiReady);
//console.log("listener");
}
})();
use below:
document.querySelector('#tidio-chat iframe').contentDocument.querySelector('form').nextSibling.remove();
instead of below:
document.querySelector('#tidio-chat iframe').contentDocument.querySelector('a[target=_blank]').remove();
@bertusjwz @manovee @Benso254 It still works, don't know if you still need it, but someone might.
Here is the whole code: