Skip to content

Instantly share code, notes, and snippets.

@samarthdave
Last active April 19, 2021 03:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samarthdave/ba583b46a878e4b5567d0be53e176c93 to your computer and use it in GitHub Desktop.
Save samarthdave/ba583b46a878e4b5567d0be53e176c93 to your computer and use it in GitHub Desktop.
Get total quizlet card count on a user's profile
// requires jQuery
var items = $(".SetPreview-cardBylineWrapper");
function parseStr(strr) {
var num = strr.split(" ")[0];
return parseInt(num);
}
var total = 0;
for (var i = 0; i < items.length; i++) {
var num = parseStr(items[i].innerText);
if (num != undefined)
total += num;
}
console.log(total/items.length);
@samarthdave
Copy link
Author

Made for the purpose of counting the absurd number of cards that https://quizlet.com/bebrill has made on quizlet.com. For the record, it's almost 90k as of right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment