Skip to content

Instantly share code, notes, and snippets.

@wbingli
Last active August 29, 2015 14:01
Show Gist options
  • Save wbingli/a3bac3ea4fedbe461786 to your computer and use it in GitHub Desktop.
Save wbingli/a3bac3ea4fedbe461786 to your computer and use it in GitHub Desktop.
Get how many pictures you have in Google plus

Below JavaScript Code will help you calculate total pictures you have in Google Plus.

Go to your google plus pictures albums page, run the script in the browser developer console. You will get your total pictures number.

//Script loading function
function load_script( source ) {
var new_script = document.createElement('script');
new_script.type = 'text/javascript';
new_script.src = source;
document.getElementsByTagName('head')[0].appendChild(new_script);
}
//Load jQuery, if page do not have it by default
if (typeof(jQuery) != 'function') load_script('http:/s/code.jquery.com/jquery-latest.js');
var photos = 0;
$(".FiLoZd").each(function(){
var num = +$(this).text().split(" ")[1];
if(!isNaN(num)){
console.log(num);
photos += num;
}
});
console.log("Total pictures:" + photos);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment