User:Bugghost/Scripts/UserRoleIndicator.js: Difference between revisions

Content deleted Content added
perf monitoring, layout changes, refactoring
minor aesthetic changes
Line 22:
console.timeEnd("get usernames")
this.addCSS('user-role-indicator', 'font-size: smaller; display: inline; background: #e7e9ffb7b9ff55; padding: 0.1em; border-radius: 5px; margin-left: 3px;')
 
const $links = this.$( '#article a, #bodyContent a, #mw_contentholder a' );
Line 259:
// 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.checkForPermission( this.wmf, '🌐', 'Wikimedia Foundation (WMF)' );
this.checkForPermission( this.stewards, '🩺', 'Steward or Ombud' );
this.checkForPermission( this.arbcom, '⚖️', 'Arbitration Committee member' );
this.checkForPermission( this.bureaucrats, '💼‍', 'Bureaucrat' );