Content deleted Content added
hand writing icon wasn't displaying correctly in my version of firefox - ๐ seems to appear better. also swapping NPP to ๐งบ (rather than ๐งฝ) |
refactoring to allow for custom labels |
||
Line 37:
}
this.hasAdvancedPermissions = false;
this.
} );
// console.timeEnd("linkloop")
Line 97:
this.bureaucrats = dataJSON.bureaucrat;
this.admins = dataJSON.sysop;
this.
this.newPageReviewers = dataJSON.patroller;
this.tenThousandEdits = dataJSON[ '10k' ];
Line 229:
}
if ( listOfUsernames[ this.user ] === 1 ) {
this.addRoleIcon(
}
}
Line 246:
}
addRoleInfoIfNeeded() {
const roleInfoLookup = {
wmf: ['๐', 'Wikimedia Foundation (WMF)'],
stewards: ['๐ฉบ', 'Steward or Ombud'],
arbcom: ['โ๏ธ', 'Arbitration Committee member'],
bureaucrats: ['๐ผโ', 'Bureaucrat'],
admins: ['๐งน', 'Admin'],
formerAdmins: ['๐ฌ', 'Former Admin'],
newPageReviewers: ['๐งบ', 'New page reviewer'],
tenThousandEdits: ['๐ฅ', 'More than 10,000 edits'],
extendedConfirmed: ['๐', 'Extended confirmed'],
lessThan500: ['๐ฃ', 'Less than 500 edits'],
};
// highlight anybody with "WMF" in their name, case insensitive. this should not generate false positives because "WMF" is on the username blacklist. see https://meta.wikimedia.org/wiki/Title_blacklist
if ( this.user.match( /^[^/]*WMF/i ) ) {
Line 253 โถ 266:
// TODO: grab the order from an array, so I can keep checkForPermission and addCSS in the same order easily, lowering the risk of the HTML title="" being one thing, and the color being another
this.
this.
this.
this.
this.
this.addRoleInfoIfAppropriate( this.formerAdmins, roleLookup.formerAdmins[0], roleLookup.formerAdmins[1]);
this.
this.
this.
// If they have no perms, then they are non-EC, so <500 edits
if ( !this.hasAdvancedPermissions ) {
this.addRoleIcon(
}
}
|