https://bugzilla.wikimedia.org/show_bug.cgi?id=44252

--- Comment #4 from Bartosz DziewoƄski <matma....@gmail.com> ---
(In reply to comment #3)
> https://en.wikipedia.org/wiki/Barack_obama?action=info
> 
> Is there a good way to select only the "Number of page watchers" table row in
> CSS or JavaScript?

Not right now. If you're looking for a quick solution, '#mw-content-text
.mw-page-info:first-of-type tr:nth-of-type(8)' will do the job for now, but
it'll break if any rows are removed or added or if the order changes.

You could probably cook up some XPath selector to find a table cell with
'Number of page watchers' inside and return the next one (there is some way of
using it in JS I'd have to look up), but I don't know it enough to be helpful
here.


> I want to highlight it from a particular hyperlink using
> an
> anchor (similar to how <ref></ref>s have a light blue background on some
> wikis). This requires being able to select only that table row. Is this
> possible currently?

If you want to use the :target pseudoclass (which would be the right way, and
it's how the <ref> highlighting is done), the table row would have to have an
ID. If in JavaScript, see above.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to