Feature summary:
I was writing this userscript when I realized Special:Log and action=history's navigation links are not wrapped in any direct parent element. This makes it hard to select those links as a whole (i.e. the whole line). Here's how I see them via DevTools:
<div><form>etc.</form></div> (newest | <a href="..." class="mw-lastlink" title="...">oldest</a>) View (newer 100 | <a href="..." class="mw-nextlink" title="..." rel="next">older 100</a>) (<a href="..." class="mw-numlink" title="...">20</a> | <a href="..." class="mw-numlink" title="...">50</a> | <a href="..." class="mw-numlink" title="...">100</a> | <a href="..." class="mw-numlink" title="...">250</a> | <a href="..." class="mw-numlink" title="...">500</a>) <ul class="mw-logevent-loglines"> <li data-mw-logid="...">etc.</li> ... <li data-mw-logid="...">etc.</li> </ul> (same links) <div class="printfooter">etc.</div>
Comparing to Special:Contribs: Contribs's mw- links are wrapped into an easily selectable p element with an appropriate class:
<div><form>etc.</form></div> <p class="mw-pager-navigation-bar">(newest | <a href="..." class="mw-lastlink" title="...">oldest</a>) View (newer 100 | <a href="..." class="mw-nextlink" title="..." rel="next">older 100</a>) (<a href="..." class="mw-numlink" title="...">20</a> | <a href="..." class="mw-numlink" title="...">50</a> | <a href="..." class="mw-numlink" title="...">100</a> | <a href="..." class="mw-numlink" title="...">250</a> | <a href="..." class="mw-numlink" title="...">500</a>)</p> <section class="mw-pager-body"> <h4>etc.</h4> <ul>etc.</ul> ... <h4>etc.</h4> <ul>etc.</ul> </section> (same links) <div class="mw-contributions-footer">etc.</div> <div class="printfooter">etc.</div>
I would also like to see the pseudo-links (i.e. newest, newer 100 et. al.) be wrapped in, say, span elements with some semantic classes like mw-notlink or something like that.
Use case and benefits:
Making HTML content not look like a mess and helping me complete the script.
Addendum: Navigation links of the following pages are also not wrapped:
- categories
- Special:ProtectedTitles
- Special:ActiveUsers
- Special:GlobalUsers
- Special:OAuthListConsumers
- Special:GlobalBlockList
...and probably plenty others.