If you go to https://en.wikipedia.org/wiki/Special:Contributions/Example and look at the block log/uploads/etc links at the top (in the #contentSub element) you'll see that they don't have IDs, which makes it hard to apply JS and CSS to, making it so that people have to use workarounds (such as checking the url of the link) in order to apply JS and CSS, which seems hacky and makes it hard for non-EN languages, which use different urls then EN.
Hi @TerraCodes, please read https://www.mediawiki.org/wiki/How_to_report_a_bug and always provide a clear list of exact steps to reproduce.
I have no idea which exact "contribs pages" this task is about. Special:Log/block ? Special:Uploads ? The latter redirects me to Special:ListFiles instead?
Please don't make people guess - thanks. :)
Yeah I probably could have been clearer, I'll edit the task a bit. Also its not really a bug unless they're intentionally supposed to have IDs but don't, but I'll add steps to reproduce anyhow.
So this seems to be about:
<div class="mw-contributions-user-tools"> For <a href="/wiki/User:Example" title="User:Example">Example</a> <span class="mw-changeslist-links"> <span><a href="/wiki/User_talk:Example" title="User talk:Example">talk</a></span> <span><a href="/w/index.php?title=Special:Log/block&page=User%3AExample" title="Special:Log/block">block log</a></span> <span><a href="/wiki/Special:ListFiles/Example" title="Special:ListFiles/Example">uploads</a></span> <span><a href="/wiki/Special:Log/Example" title="Special:Log/Example">logs</a></span> <span><a href="/w/index.php?title=Special:AbuseLog&wpSearchUser=Example" title="Edit Filter log for this user">filter log</a></span> </span> </div>
children = $(".mw-changeslist-links").children;
Now you have an array of the five spans, with which you can apply styling. No?
I don't see why these elements need ids.
@Guywan: The OP brings up the fact that, since the only thing available to distinguish each individual item are the href and title, it can be difficult to style any one in particular, since those are localized. The set of links isn't the same, mind you; they vary according to the viewing user's usergroups. children, etc. isn't the same for everyone, everywhere (maybe 0 and -1 are?).
Yeah, and I'd like a way that doesn't feel hacky (like trying to match the url of a page), or hoping that the elements are in the same order everytime, which might not be true if you inject custom links.