Skip to content

Instantly share code, notes, and snippets.

@kjgarza
Created October 3, 2012 17:25
Show Gist options
  • Save kjgarza/3828448 to your computer and use it in GitHub Desktop.
Save kjgarza/3828448 to your computer and use it in GitHub Desktop.
Ration of Author to Cite himself
var auth = "Floridi"
var authors = document.querySelectorAll(".gs_a");
var c = 0;
for(i=0; i<authors.length; i++) {
var name = authors[i].innerHTML;
if (name.indexOf(auth) != -1){
c++;
}
}
console.log(100*(c/authors.length));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment