User:Markhurd/hidetopcontrib.js: Difference between revisions

Content deleted Content added
allow user configuration of link ___location and text (backwards-compatible)
Markhurd (talk | contribs)
Remove legacy Javascript. Document User:Waldir's change.
Line 15:
// 120207 MEH Cater for all skins.
// 120321 MEH Cater for [[Wikipedia:Added or removed characters|WP:AORC]] by removing support for top not using the mw-uctop class.
// 121123 User:Waldir Allow user configuration of link ___location and text.
// 150121 MEH Remove legacy Javascript.
 
// This script hides lines according to who has the top contribution for a page.
Line 69 ⟶ 71:
}
jQuery( function( $ ) {
addOnloadHook(function () {
if(mw.config.get('wgCanonicalSpecialPageName') == 'Contributions') {
var htPortletLink = mw.util.addPortletLink(portletId, 'javascript:hidetopcontrib()#', portletText, 'ca-hidetop',
"Show/hide pages for which you're the top contributor", '');
$( htPortletLink ).click( function ( e ) {
e.preventDefault();
hidetopcontrib();
});
}
});