GoHighLevel does not play notification sounds properly, especially when a live chat comes in. This causes you to lose your chance to respond to the live chat in a timely manner.
This script ensures a sound is played when notifications, such as live chat notifications, turn on.
The script continuously checks if the #recent_activities-toggle element contains -notification. If present, it starts playing a sound repeatedly. If removed, it stops the sound. The loop runs every 1 second.
Copy the Code Below. Create a New Bookmark in your browser. Paste the Code into the "URL" field of the bookmark. Save it. Click the Bookmark whenever you want the notification check to be active.
javascript:(function(){let audio=new Audio("https://www.myinstants.com/media/sounds/bell.mp3");audio.loop=true;function checkNotification(){let el=document.querySelector("#recent_activities-toggle%22);if(el&&el.classList.contains(%22-notification%22)){if(audio.paused){audio.play();}}else{audio.pause();audio.currentTime=0;}}setInterval(checkNotification,1000);})();
Fully expanded, this is the code:
javascript:(function(){
let audio = new Audio("https://www.myinstants.com/media/sounds/bell.mp3"); // Replace with your preferred sound URL
audio.loop = true; // Ensure it plays continuously
function checkNotification() {
let el = document.querySelector("#recent_activities-toggle");
if (el && el.classList.contains("-notification")) {
if (audio.paused) {
audio.play();
}
} else {
audio.pause();
audio.currentTime = 0;
}
}
setInterval(checkNotification, 1000); // Check every second
})();
This could show a visual cue on the page that the "plugin" is active. It could be installed as a greasemonkey plugin (is that still a thing?)
If this is helpful, please check out CloudPano - www.cloudpano.com or considering using my instance of GHL - www.leadstack.ai