Last active
August 29, 2015 14:17
-
-
Save tamvm/c8114b35b2d3222ad668 to your computer and use it in GitHub Desktop.
count lead
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
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('[email protected]')").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