MediaWiki:Gadget-walcome.js
Tak tent: Efter hainin, ye micht hae tae bypass yer brouser's cache for tae see the chynges. Mozilla / Firefox / Safari: haud doun Shift while dabbin on Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: haud doun Ctrl while dabbin on Refresh, or press Ctrl-F5; Konqueror: juist dab on the Reload button, or press F5; Opera users micht hae tae haillie dicht thair cache in Tools→Preferences.
/* Derived from [[en:User:Enterprisey/rc-thanks]] */
mw.loader.using( [ "mediawiki.util" ], function () {
function go() {
$( "table[data-mw-revid],tr[data-mw-revid] td.mw-enhanced-rc-nested" )
.filter( function( idx, el ) { return !el.querySelector( "a.mw-thanks-thank-link" ); } )
.each( function ( idx, el ) {
var revid = el.dataset.mwRevid ||
el.parentNode.dataset.mwRevid;
var el = $( el );
var thanksSpan = $( "<span>" ).append( " (", $( "<a>" )
.addClass( "mw-thanks-thank-link" )
.attr( "href", mw.util.getUrl( "Special:Thanks/" + revid ) )
.text( "thank" ), ")" );
var rollbackLink = el.find( "span.mw-rollback-link" );
if( rollbackLink.length ) {
rollbackLink.after( thanksSpan );
} else {
el.append( thanksSpan );
}
} );
}
// The hook will already run go(); no need to run it again
mw.hook( "wikipage.content" ).add( go );
} );
}