Skip to content

Instantly share code, notes, and snippets.

@tamvm
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamvm/c8114b35b2d3222ad668 to your computer and use it in GitHub Desktop.
Save tamvm/c8114b35b2d3222ad668 to your computer and use it in GitHub Desktop.
count lead
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq); var count = '0';
setInterval(function() {
$ = jQuery.noConflict(); $.get("http://offer-alert.herokuapp.com/api/v1/leads/summary.html", function(a) {
count = $(a).find("td:contains('tam@sushiwork.com')").siblings().eq(1).text();
if (document.title != count) { document.title = count; var msg = new SpeechSynthesisUtterance(count); window.speechSynthesis.speak(msg); }
});
}, 3000);1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment