MediaWiki:Gadget-ArticleTraffic.js: Perbedaan antara revisi
Tampilan
Konten dihapus Konten ditambahkan
gadget baru |
k ~text |
||
Baris 6: | Baris 6: | ||
if (month < 10) month = '0' + month; |
if (month < 10) month = '0' + month; |
||
var yearMonth = year + '' + month; |
var yearMonth = year + '' + month; |
||
var sText = 'Statistik |
var sText = 'Statistik kunjungan'; |
||
var sLink = 'http://stats.grok.se/id/' + yearMonth + '/' + wgPageName; |
var sLink = 'http://stats.grok.se/id/' + yearMonth + '/' + wgPageName; |
||
addPortletLink( 'p-tb', sLink, sText, 't-traffic', 'Statistik kunjungan halaman ini' ); |
addPortletLink( 'p-tb', sLink, sText, 't-traffic', 'Statistik kunjungan halaman ini' ); |
Revisi per 7 April 2010 12.21
function addArticleTrafficPortletLink() {
if ( wgServer == 'http://wiki-indonesia.club' ) {
var currentTime = new Date();
var year = currentTime.getFullYear();
var month = currentTime.getMonth() + 1;
if (month < 10) month = '0' + month;
var yearMonth = year + '' + month;
var sText = 'Statistik kunjungan';
var sLink = 'http://stats.grok.se/id/' + yearMonth + '/' + wgPageName;
addPortletLink( 'p-tb', sLink, sText, 't-traffic', 'Statistik kunjungan halaman ini' );
}
}
addOnloadHook( addArticleTrafficPortletLink );