hidetopcontrib
Browsers *
Skins *
Languages en it
Code hidetopcontrib.js
Released March 26, 2009 (2009-03-26)
Updated May 8, 2022; 20 months ago (2022-05-08)
Developer   Mark Hurd

On any User's Contributions page, this script hides lines when that user has the top contribution for a page. Clicking again undoes the hiding.

If userHideAllSubsequent=true, all subsequent contributions are hidden too, more like watchlists.

Based on User:Ais523/hidetopcontrib.js

By a suggestion by User:Discospinster

Installation

Add the following to your common.js:

importScript('User:Markhurd/hidetopcontrib.js');

Optionally also add the following, if you want it (see above):

userHideAllSubsequent=true;

Appearance

This will create a new tab (not a new field or checkbox in the body of the page).

The Vector skin places the "Show/hide top" 'tab' in a drop down on the right hand side of the top line next to "Search".

Of course, as for anyone who cannot see the tab, you may need to refresh your cache the first time(s) after you change a .js file.

Alternatives

These were used in the past or may be needed on other wikis:

Instead of importScript:

// [[:en:User:Markhurd/hidetopcontrib.js]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Markhurd/hidetopcontrib.js' 
              + '&action=raw&ctype=text/javascript');

or

// [[:en:User:Markhurd/hidetopcontrib.js]]
importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Markhurd/hidetopcontrib.js' 
               + '&action=raw&ctype=text/javascript');


Instead of common.js, you can use your skin's .js, such as vector.js or monobook.js, but I have confirmed it (now) works in all skins.

Italians can use my it version direct rather than using this version remotely:

importScript('Utente:Markhurd/hidetopcontrib.js');

Known Bugs

In IE8, at least, new articles and redirects where the edit summary does not contain a link are not removed whenever they should be. Don't have time to debug it fully now, but presumably the b index is wrong in this case. Mark Hurd (talk) 01:56, 9 July 2010 (UTC) IE uses capital tag names (i.e. <ABBR ...> instead of <abbr ...>), so I just made all Regex case independent. Mark Hurd (talk) 14:35, 6 February 2012 (UTC)

Currently it is removing some articles that are not the newest! At least it is for me in both Chrome and IE8. (For example, check my contributions and search for 2012 in Australia; note I am not the top contributor but it is removed.) Mark Hurd (talk) 01:06, 20 March 2012 (UTC) This was due to WP:AORC using <strong> for large changes. Mark Hurd (talk) 02:05, 21 March 2012 (UTC)

Not quite a bug, but the suggested changes from == to === actually break this code somehow, so they haven't been done. Mark Hurd (talk) 00:50, 21 January 2015 (UTC)

Revision History

090325 MEH

090615 MEH

100407 MEH

100413 MEH

100428 MEH

100519 Ale_jrb

110520 Waldir

120206 MEH

120207 MEH

120321 MEH

121123 Waldir

150121 MEH