-
-
Save arafathusayn/101a211b3d8122876d70cf1af04ae81d to your computer and use it in GitHub Desktop.
var removeBranding = function() { | |
try { | |
var element = document.querySelector("iframe[title*=chat]:nth-child(2)").contentDocument.querySelector(`a[class*=tawk-branding]`) | |
if (element) { | |
element.remove() | |
} | |
} catch (e) {} | |
} | |
var tick = 100 | |
setInterval(removeBranding, tick) |
not working properly in 0.8.2 plugin (2024 verison), sometimes the layout of the chat interface is offset, and can not show chat window properly.
Instead of removing a node, you can inject some CSS to change the widget appearance, such as:
const style = document.createElement('style');
style.textContent = 'a.tawk-branding {display:none;}';
document.querySelector('iframe[title*="chat"]:nth-child(2)').contentDocument.head.appendChild(style);
Please provide new tawk brand removing code because previous code not working..
Below mentioned script not working currently.
var removeBranding = function() {
try {
var element = document.querySelector("iframe[title*=chat]:nth-child(2)").contentDocument.querySelector(a[class*=tawk-branding]
)
if (element) {
element.remove()
}
} catch (e) {}
}
var tick = 100
setInterval(removeBranding, tick)
var removeBranding = function() {
try {
const style = document.createElement('style');
style.textContent = '.tawk-padding-small {display:none !important;}';
document.querySelector('iframe[title*="chat"]:nth-child(2)').contentDocument.head.appendChild(style)
} catch (e) {}
}
var tick = 100
setInterval(removeBranding, tick)
2025 new tawk remove logo
How we can achieve this is next js website bro please help me.
Worked For Me!
Create a JavaScript file:
Create a new JavaScript file, for example, custom-script.js, and paste the above code into this file.
Upload the JavaScript file:
Upload the JavaScript file to your theme directory or another appropriate location in your WordPress installation.
Enqueue the script in your theme's functions.php:
Open your theme's functions.php file and add the following code to enqueue your script:
functions.php - code
Now, your JavaScript code will be included and executed on the client side when the website is loaded.