MediaWiki:Gadget-Contributors.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k code
 
Kenrick95 (bicara | kontrib)
addPortletLink -> mw.util.addPortletLink; addOnloadHook -> $; formatting
Baris 1:
function addContributorsPortletLink() {
if ( wgNamespaceNumber != -1 ) {
var sServer = 'wikipedia';
switch ( wgServer ) {
case 'http://id.wikibooks.org':
sServer = 'wikibooks';
break;
case 'http://id.wiktionary.org':
sServer = 'wiktionary';
break;
case 'http://id.wikiquote.org':
sServer = 'wikiquote';
break;
case 'http://id.wikisource.org':
sServer = 'wikisource';
break;
}
var sText = 'Kontributor halaman';
var sLink = 'http://tools.wikimedia.de/~daniel/WikiSense/Contributors.php?' +
'wikilang=id&wikifam=.' + sServer + '.org&grouped=on&order=-rev_timestamp&' +
'max=100&format=html&page=' +
( wgCanonicalNamespace !== "" ? wgCanonicalNamespace + ':' : "") + wgTitle;
mw.util.addPortletLink( 'p-tb', sLink, sText, 't-contrib-ext',
'Daftar kontributor halaman ini' );
}
}
addOnloadHook$( addContributorsPortletLink );