MediaWiki:Gadget-ArticleStatistik.js
Catatan: Setelah menyimpan, Anda harus memintas tembolok (cache) peramban Anda untuk melihat perubahannya. Google Chrome, Firefox, Microsoft Edge dan Safari: Tahan tombol ⇧ Shift dan klik Muat ulang (Reload) di tombol bilah alat. Untuk detail dan instruksi tentang peramban lain, lihat halaman menghapus singgahan (Inggris).
function addContributorsPortletLink() {
if ( mw.config.get('wgNamespaceNumber') != -1 ) {
var sServer = 'wikipedia';
switch ( mw.config.get('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 = 'Statistik suntingan';
var sLink = 'http://toolserver.org/~soxred93/articleinfo/index.php?' +
'lang=id&wiki=wikipedia&article=' + ( mw.config.get('wgCanonicalNamespace') != "" ? mw.config.get('wgCanonicalNamespace') + ':' : "") + mw.config.get('wgTitle');
mw.util.addPortletLink( 'p-tb', sLink, sText, 't-contrib-ext',
'Statistik suntingan halaman ini' );
}
}
$( addContributorsPortletLink );