User:KurwaAntics/LevelSystem.js

//When looking at a user profile page, if ($("#UserProfileMasthead").size) { //get the displayed editcount, editCount = $("#UserProfileMasthead .tally em").html.replace(",",""); //compare it to a predefined list of levels, editRanks = { 1:"LEVEL 1", 10:"LEVEL 2", 25:"LEVEL 3", 50:"LEVEL 4", 90:"LEVEL 5", 150:"LEVEL 6", 235:"LEVEL 7", 350:"LEVEL 8", 500:"LEVEL 9", 690:"LEVEL 10", 925:"LEVEL 11", 1210:"LEVEL 12", 1550:"LEVEL 13", 1950:"LEVEL 14", 2415:"LEVEL 15", 2950:"LEVEL 16", 3560:"LEVEL 17", 4250:"LEVEL 18", 5025:"LEVEL 19", 5890:"LEVEL 20", 6850:"LEVEL 21", 7910:"LEVEL 22", 9075:"LEVEL 23", 10350:"LEVEL 24", 11740:"LEVEL 25", 13250:"LEVEL 26", 14885:"LEVEL 27", 16650:"LEVEL 28", 18550:"LEVEL 29", 20590:"LEVEL 30", 22775:"LEVEL 31", 25110:"LEVEL 32", 27600:"LEVEL 33", 30250:"LEVEL 34", 33065:"LEVEL 35", 36050:"LEVEL 36", 39210:"LEVEL 37", 42550:"LEVEL 38", 46075:"LEVEL 39", 49790:"LEVEL 40", 53700:"LEVEL 41", 57810:"LEVEL 42", 62125:"LEVEL 43", 66650:"LEVEL 44", 71390:"LEVEL 45", 76350:"LEVEL 46", 81535:"LEVEL 47", 86950:"LEVEL 48", 93110:"LEVEL 49", 100000:"LEVEL 50", };   for(i in editRanks) if (editCount >= parseInt(i)) editRank = editRanks[i]; //and display the corresponding level as a tag. if (editCount) $($(" ").addClass("tag").html(editRank)).appendTo(".masthead-info hgroup"); }