Content deleted Content added
adding example custom labels image |
GoldRomean (talk | contribs) typos (cool script!) ย |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1:
{{Infobox user script
| name = UserRoleIndicator
Line 6 โถ 4:
| author = [[User:Bugghost|Bugghost]]. Forked from [[User:Novem Linguae/Scripts/UserHighlighterSimple|UserHighlighterSimple]], which was made by {{ping|Novem Linguae}}, <small>which in turn was forked from a script with many authors: {{ping|Chlod|Pythoncoder|Bellezzasolo|Theopolisme|Amalthea|Ais523}}</small>
| source = [[User:Bugghost/Scripts/UserRoleIndicator.js]]
| screenshot = [[File:UserRoleIndicator examples v1.0.png|
}}
This script adds customisable little
Forked from [[User:Novem Linguae]]'s [[User:Novem Linguae/Scripts/UserHighlighterSimple|UserHighlighterSimple]], and uses 90% of the same code. This fork just adds a little div with an emoji in it next to the link, rather than setting custom CSS on the link itself - signatures are (in most cases) left in-tact. == Installation ==
Go install [[User:Enterprisey/script-installer]], then come back to this page and click the giant blue "Install" button in the infobox on the right.
== Roles and
The default labels used are [[emoji]], but can be customised to be any text (see below). The default labels are:
* ๐ฃ โ Less than 500 edits
*
*
* ๐งบ โ [[WP:NPR|New
* ๐ต๏ธ โ [[WP:CheckUser|CheckUser]]
* ๐งน โ [[WP:Admin|Admin]]
* ๐ฌ โ Former Admin
Line 28 โถ 29:
* ๐ฉบ โ [[M:Steward|Steward]] or [[M:Ombud|Ombud]]
* ๐ โ Wikimedia Foundation (WMF)
* ๐ค โ [[Wikipedia:Bots|Bot account]]
The links are given a tooltip when hovering, <u><span title="hello">like this</span></u>, which states the full role.
The default symbol choices are a bit tongue-in-cheek - they shouldn't be taken too seriously
The
'''Note''': unlike [[User:Novem Linguae/Scripts/UserHighlighterSimple|Novem Linguae/Scripts/UserHighlighterSimple]], this script adds new inline elements to the DOM (rather than
== Custom Labels / Placement ==
If you don't like the default emoji labels or tooltip texts, you can customise them to be anything you want, including just regular old text.
Line 45 โถ 47:
<syntaxhighlight lang="js" line="1">window.UserRoleIndicatorCustomLabels = {
wmf: ['๐', 'Wikimedia Foundation (WMF)'],
bot: ['๐ค', 'Bot'],
stewards: ['๐ฉบ', 'Steward or Ombud'],
arbcom: ['โ๏ธ', 'Arbitration Committee member'],
bureaucrats: ['๐ผโ', 'Bureaucrat'],
checkUsers: ['๐ต๏ธ', 'Check User'],
admins: ['๐งน', 'Admin'],
formerAdmins: ['๐ฌ', 'Former Admin'],
newPageReviewers: ['๐งบ', 'New page reviewer'],
tenThousandEdits: ['
extendedConfirmed: ['
lessThan500: ['๐ฃ', 'Less than 500 edits'],
};</syntaxhighlight>
Line 76 โถ 80:
[[File:UserRoleIndicator custom examples.png|UserRoleIndicator custom examples.png]]
'''If you want the labels to appear ''before'' the user name''', open up your common.js file and add this line:
<syntaxhighlight lang="js" line="1">
this.window.UserRoleIndicatorCustomPlacement = "before";
</syntaxhighlight>
Thanks to [[User:Penultimate_supper]] for the feature suggestion!
== Bugs, feedback and suggestions ==
Line 86 โถ 98:
Either way - let me know if you have any issues and I'll take a look and see if I can get to the bottom of it.
== Updates ==
Now that other people are using this script I don't want to make many big changes, but I will occasionally when it's a safe, small non-controversial change.
* Nov 5 2024 - [[User talk:Bugghost/Scripts/UserRoleIndicator#Indicator before signature?|As requested]], added an option to enable the icons to appear ''before'' a user name, not just afterwards
* Jan 22 2025 - Added [[CheckUser]] as a supported role. The icon is the gender-neutral detective ๐ต๏ธ (unicode U+1F575). See above for how to customise.
== Todo ==
* <s>Add method of custom emoji choices</s>
* <s>More thorough testing</s>
* <s>Add installation instructions</s>
* <s>Add image of custom labels in use</s>
* Find out what you're actually meant to do once you've made a userscript
|