Jump to content

User:Bugghost/Scripts/UserRoleIndicator

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Bugghost (talk | contribs) at 14:38, 11 July 2024 (adding script doc). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) โ† Previous revision | Latest revision (diff) | Newer revision โ†’ (diff)

Adds a little icon next to usernames based on their user role. Forked from User:Novem Linguae/Scripts/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.

Roles and symbols

The symbols used are:


Some of the symbol choices are a bit tongue-in-cheek - they shouldn't be taken too seriously. If you have any good ideas for better emojis/unicode symbols for these roles, lemme know. (In the future I would like to expose a method for setting custom symbols/text for these roles to make this easy to change.)

The symbol is placed in a tasteful semitransparent box next to the username.

Note: unlike Novem Linguae/Scripts/UserHighlighterSimple, this script adds new inline elements to the DOM (rather than just changing colours to existing DOM elements), and so can make contents of the page jump a small amount when initial loading.

Bugs, feedback and suggestions

This is my first ever attempt at Wikipedia user script! If you have any issues or feedback, let me know.

Note that this is mainly a fork of Novem Linguae/Scripts/UserHighlighterSimple, and the differences are largely cosmetic. Any issues with the icon rendering incorrectly is almost definitely a bug in this script - but issues identifying correct user roles may come from somewhere else - it could be worth trying to replicate using UserHighlighterSimple and seeing if any issue you're having is replicable there too.

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.

Todo

  • Add method of custom emoji choices
  • More thorough testing
  • Find out what you're actually meant to do once you've made a userscript