Last active
January 10, 2017 22:51
-
-
Save brandonhellman/68ce7a2949ea467d751844b3ae106807 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Favicon Alert | |
// @namespace https://github.com/Kadauchi/ | |
// @version 1.0.2 | |
// @description blank | |
// @author Kadauchi | |
// @icon http://i.imgur.com/oGRQwPN.png | |
// @include http://www.mturkcrowd.com/* | |
// @include https://turkerhub.com/* | |
// @grant GM_log | |
// //@require https://raw.githubusercontent.com/ejci/favico.js/master/favico.js | |
// @require https://raw.githubusercontent.com/tommoor/tinycon/master/tinycon.js | |
// ==/UserScript== | |
const target = document.getElementById(`VisitorExtraMenu_Counter`); | |
const observer = new MutationObserver( function () { | |
const count = target.getElementsByClassName(`Total`)[0].textContent; | |
Tinycon.setBubble(+(count)); | |
//const favicon = new Favico({type: `rectangle`, animation: `none`}); | |
//favicon.badge(+(count)); | |
}); | |
observer.observe(target, {attributes: true, childList: true, characterData: true}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment