Last active
July 23, 2018 07:01
-
-
Save jethrokuan/2b0023544104ff15bad3f90e5595e0be to your computer and use it in GitHub Desktop.
Archipelago Squatter
This file contains 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
// 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