Created
August 26, 2011 09:40
-
-
Save nikolaplejic/1173078 to your computer and use it in GitHub Desktop.
Quick & dirty operating system statistics for usesthis.com
This file contains hidden or 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
/* | |
step 1: open http://usesthis.com/interviews/ | |
step 2: open firebug (or chrome inspector) | |
step 3: inject jquery (*) | |
step 4: run the script below | |
results (Aug 26th, 2011) -- total: 156 | windows: 34, linux: 13, mac: 130 | |
(*) | |
var script=document.createElement('script'); | |
script.src = "http://code.jquery.com/jquery-latest.min.js"; | |
var head=document.getElementsByTagName('head')[0]; | |
head.appendChild(script); | |
*/ | |
var mac = 0; | |
var linux = 0; | |
var windows = 0; | |
var total = 0; | |
$("#interviews > li").each(function(i) { | |
total++; | |
$(".categories li a", this).each(function(i) { | |
switch ($(this).html()) { | |
case "windows": | |
windows++; | |
break; | |
case "linux": | |
linux++; | |
break; | |
case "mac": | |
mac++; | |
break; | |
} | |
}); | |
}); | |
console.log("total: %o | windows: %o, linux: %o, macos: %o", total, windows, linux, mac); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment