Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Adds custom usertags to the Oasis profile masthead
- *
- * @author Rappy 4187 <http://c.wikia.com/wiki/User:Rappy_4187>
- * @author Cqm <http://c.wikia.com/wiki/User:Cqm>
- */
- $( function () {
- var title = mw.config.get( 'wgTitle' ),
- rights = {
- // BUREAUCRATS
- 'John Trololo': ['Bureaucrat'],
- 'Think D. Solucer': ['Bureaucrate'],
- // ADMINISTRATORS
- 'Emperor Jarjarkine': ['Administrateur', 'MDM-Décembre 2013'],
- // Conseil
- 'Portgas D. Dohv': ['Conseiller'],
- 'ImpactZone': ['Conseiller'],
- 'WolfIce': ['Conseiller'],
- 'TehBlaaz': ['Conseiller'],
- // Patrouilleurs
- 'insertnamehere': ['Patrouilleurs'],
- // Membres de confiance
- 'Hulothe': ['Membre de Confiance'],
- 'Matauf': ['Membre de Confiance'],
- 'TombRaiser': ['Membre de Confiance']
- },
- toAdd,
- i,
- len;
- if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Contributions' ) {
- title = title.split( '/' )[1];
- }
- if ( rights[title] ) {
- // remove old rights
- $('.UserProfileMasthead .masthead-info span.tag').remove();
- toAdd = rights[title];
- len = toAdd.length;
- for ( i = 0; i < len; i++ ) {
- // add new rights
- $( '<span>' )
- .text( toAdd[i] )
- .addClass( 'tag' )
- .appendTo( '.masthead-info hgroup' );
- }
- }
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement