Jump to content

User talk:Bugghost/Scripts/UserRoleIndicator

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Indicator before signature?

[edit]

Is there an easy adjustment that could be made ( or just a line I could add to custom JS to customize the existing script) to make the indicators appear before the name?

For people whose signatures have multiple spans, the indicator appears in the middle of them, and makes for a confusing experience when using a screen reader, but if I could make it appear before their signature, or somehow after the second span, this would be solved. I’m guessing after the second span is hard, since it’s often a link to a different page, so before probably makes more sense.

I tried to figure out how to adjust this myself, but my decade rusty JavaScript knowledge didn’t suffice, and I never really got the hang of DOM manipulation even back then. —penultimate_supper 🚀 (talkcontribs) 16:44, 5 November 2024 (UTC)[reply]

This should be an easy thing to add as an option - I'll have a look at adding it as something configurable and will get back to you BugGhost🦗👻 18:25, 5 November 2024 (UTC)[reply]
Thanks! — penultimate_supper 🚀 (talkcontribs) 18:35, 5 November 2024 (UTC)[reply]
Just changed the code a bit to allow this - if you go into your common.js file and add this line anywhere, then the user role labels should appear before the link text:
this.window.UserRoleIndicatorCustomPlacement = "before";
You may have to clear out your cache/hard refresh for your browser to pick up the new version of the script. Let me know if you have any issues! BugGhost🦗👻 18:55, 5 November 2024 (UTC)[reply]
Fantastic, thank you a lot, it works perfectly! This makes people's complicated signatures come through a bit better, and will make things make a bit more sense when I use a screen reader. Very much appreciate it! — penultimate_supper 🚀 (talkcontribs) 19:44, 5 November 2024 (UTC)[reply]
No worries, glad I could help :) BugGhost🦗👻 20:38, 5 November 2024 (UTC)[reply]