Skip to content

Instantly share code, notes, and snippets.

@brandonhellman
Last active January 10, 2017 22:51
Show Gist options
  • Save brandonhellman/68ce7a2949ea467d751844b3ae106807 to your computer and use it in GitHub Desktop.
Save brandonhellman/68ce7a2949ea467d751844b3ae106807 to your computer and use it in GitHub Desktop.
// ==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