Omnimaga
General Discussion => Technology and Development => Web Programming and Design => Topic started by: Juju on March 04, 2012, 01:11:23 am
-
Paste this into your address bar and/or your bookmark bar and you get a FPS counter on any site. Pretty useful if you lag or if you want to benchmark your browser. (Note that it's the same FPS counter used in OmniPlayer2.)
javascript:(function(){var script=document.createElement('script');script.type='text/javascript';script.src='http://github.com/mrdoob/stats.js/raw/master/build/Stats.js';document.body.appendChild(script);script=document.createElement('script');script.innerHTML='var interval=setInterval(function(){if(typeof Stats==\'function\'){clearInterval(interval);var stats=new Stats();stats.getDomElement().style.position=\'fixed\';stats.getDomElement().style.left=\'0px\';stats.getDomElement().style.top=\'0px\';document.body.appendChild(stats.getDomElement());setInterval(function(){stats.update();},1000/60);}},100);';document.body.appendChild(script);})();
-
Nice, did you write it yourself?
(When I saw who started the post, I had to read through the code first to make sure it wasn't a rickroll :P)
-
No, I found this on GitHub.
-
I'm not really sure how to use this. I can use something like Katamari which used javascript and a bookmark but it just does a google search when I paste it into the address bar.
-
Hm, for some reason, Google Chrome removes the javascript: at the beginning when you paste it into the address bar, so you have to put it back.
-
Very weird, why no simple copy and paste true code/url!!!
It's like when you copy a link from a Google search result and you have this convoluted google url instead of the actual url.
Anyway about the FPS counter:
Still doesn't work for me. I know I am not doing something right but it should work similar to Katamari, which I bookmarked.