Skip to content

Instantly share code, notes, and snippets.

@jethrokuan
Last active July 23, 2018 07:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jethrokuan/2b0023544104ff15bad3f90e5595e0be to your computer and use it in GitHub Desktop.
Save jethrokuan/2b0023544104ff15bad3f90e5595e0be to your computer and use it in GitHub Desktop.
Archipelago Squatter
// Bookmarklet Usage:
javascript:(function () {
var audio = new Audio('https://notificationsounds.com/notification-sounds/definite-555/download/ogg');
var targetNode = document.getElementsByClassName("ng-toast__list")[0];
var config = {
childList: true,
subtree: true
};
var callback = function(mutationsList) {
for (var mutation of mutationsList) {
audio.play();
}
};
var observer = new MutationObserver(callback);
observer.observe(targetNode, config);
alert("Squatter enabled!");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment