Skip to content

Instantly share code, notes, and snippets.

@irudoy
Created June 22, 2014 14:19
Show Gist options
  • Save irudoy/a73cc14ac81562888f0b to your computer and use it in GitHub Desktop.
Save irudoy/a73cc14ac81562888f0b to your computer and use it in GitHub Desktop.
javascript:(function()%7B(function()%7Bvar el%3Ddocument.createElement(%27div%27),b%3Ddocument.getElementsByTagName(%27body%27)%5B0%5D%3Botherlib%3Dfalse,msg%3D%27%27%3Bel.style.position%3D%27fixed%27%3Bel.style.height%3D%2732px%27%3Bel.style.width%3D%27220px%27%3Bel.style.marginLeft%3D%27-110px%27%3Bel.style.top%3D%270%27%3Bel.style.left%3D%2750%25%27%3Bel.style.padding%3D%275px 10px%27%3Bel.style.zIndex%3D1001%3Bel.style.fontSize%3D%2712px%27%3Bel.style.color%3D%27%23222%27%3Bel.style.backgroundColor%3D%27%23f99%27%3Bfunction getScript(url,success)%7Bvar script%3Ddocument.createElement(%27script%27)%3Bscript.src%3Durl%3Bvar head%3Ddocument.getElementsByTagName(%27head%27)%5B0%5D,done%3Dfalse%3Bscript.onload%3Dscript.onreadystatechange%3Dfunction()%7Bif(!done%26%26(!this.readyState%7C%7Cthis.readyState%3D%3D%27loaded%27%7C%7Cthis.readyState%3D%3D%27complete%27))%7Bdone%3Dtrue%3Bsuccess()%3Bscript.onload%3Dscript.onreadystatechange%3Dnull%3Bhead.removeChild(script)%3B%7D%7D%3Bhead.appendChild(script)%3B%7DgetScript(%27http://code.jquery.com/jquery-latest.min.js%27,function()%7Bif(typeof jQuery%3D%3D%27undefined%27)%7Bmsg%3D%27Sorry, but jQuery wasn%5C%27t able to load%27%3B%7Delse%7Bvar time%3D0%3B%24(%27table tr%27).each(function(i,el)%7Bvar h%3DparseInt(%24(el).find(%27td%27).eq(1).html().split(%27:%27)%5B0%5D)%3Bvar m%3DparseInt(%24(el).find(%27td%27).eq(1).html().split(%27:%27)%5B1%5D)%3Bh%3Dh*60%3Bif(!isNaN(h))time%2B%3D(h%2Bm)%3B%7D)%3Bmsg%3D%27Your time: %27%2Btime/60%3B%7Dreturn showMsg()%3B%7D)%3Bfunction showMsg()%7Bel.innerHTML%3Dmsg%3Bb.appendChild(el)%3Bwindow.setTimeout(function()%7Bif(typeof jQuery%3D%3D%27undefined%27)%7Bb.removeChild(el)%3B%7Delse%7BjQuery(el).fadeOut(%27slow%27,function()%7BjQuery(this).remove()%3B%7D)%3Bif(otherlib)%7B%24jq%3DjQuery.noConflict()%3B%7D%7D%7D,2500)%3B%7D%7D)()%3B%7D)()%3B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment