User:Ramesh Ramaiah/pagestats.js

if(mw.config.get('wgNamespaceNumber')>=0) mw.loader.using('mediawiki.util', function{   $(document).ready(function{ var dt=new Date; var y=dt.getFullYear; var m=dt.getMonth; if(m==0){ y--; m=12; } if(m<10) m='0'+m; var lang=encodeURIComponent(mw.config.get('wgContentLanguage')); var title=encodeURIComponent(mw.config.get('wgPageName')); mw.util.addPortletLink('p-tb', 'http://stats.grok.se/'+lang+'/'+y+''+m+'/'+title, 'Page view stats', 't-pageviews'); mw.util.addPortletLink('p-tb', 'http://vs.aka-online.de/cgi-bin/wppagehiststat.pl?lang='+lang+'&page='+title, 'Page edit stats', 't-editstats'); mw.util.addPortletLink('p-tb', 'http://toolserver.org/~dispenser/cgi-bin/readability1.2.py?family=wikipedia&lang='+lang+'&page='+title, 'Page readability stats', 't-readability'); mw.util.addPortletLink('p-tb', 'http://tools.wikimedia.de/~dispenser/cgi-bin/webchecklinks.py?page='+title, 'Check external links', 't-extlinks'); mw.util.addPortletLink('p-tb', 'http://toolserver.org/~dispenser/cgi-bin/watcher.py?page='+title, 'Watcher count', 't-watchercount'); }); });