Last active
January 19, 2020 19:16
-
-
Save RoduanKD/aaafc9e227248278b5a7a04c50d6d20f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* A piece of code to help my friends work better. | |
* @author [email protected] (Roduan Kareem Aldeen) | |
* https://www.github.com/RoduanKareemAldeen | |
*/ | |
var element = document.querySelector("div.react_meshim_dashboard_components_navBar_OldServeButton > span"); | |
// this is the mp3 sound (feel free to change it) | |
var src = 'https://www.waleedalrashed.com/sounds/sms.mp3'; | |
var sound= new Audio(src); | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (mutation.type == "attributes") { | |
if (element.textContent != '0 requests') { | |
if (document.querySelector("div.meshim_dashboard_components_visitors_visitorList_renderers_PageFilteredList.visitor_list_container.incoming_table .tag_special").textContent == 'likecoupon') | |
sound.play() | |
} | |
} | |
}); | |
}); | |
observer.observe(element, { | |
attributes: true //configure it to listen to attribute changes | |
}); |
You are more than welcome
please change the sound to this one:
http://soundbible.com/grab.php?id=2156&type=mp3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much.
Appreciate your work