MediaWiki:Common.js/UserDesignations.js

/* Display of ranking on userprofile masthead by User:KettleMeetPot */ $(document).ready(function {   setTimeout(function { if ($(".ranking").exists) { var name = $(".masthead-info hgroup h1").text; var rankObject = $(".ranking p a").text.split(" #"); rankObject = rankObject[1].split(""); var mastheadString10 = name + "-D-0-"; var mastheadString10Plus = name + "-D-"; for ( i = 0; i <= rankObject.length - 1; i++ ) { if (rankObject.length - 1 === 0) { mastheadString10 = mastheadString10 + rankObject; }               else if ( rankObject.length - 1 > 0 && i != rankObject.length - 1) { mastheadString10Plus = mastheadString10Plus + rankObject[i] + "-"; mastheadString10 = mastheadString10Plus; }               else { mastheadString10 = mastheadString10 + rankObject[i]; }           }            $(".masthead-info hgroup h1").html(' Recognised: ' + mastheadString10); }   }, 2000); });