User:PAC2/userbox.js

mw.loader.using('mediawiki.util', function {

$("#p-pagemisc").append("User box  ") ;

var userbox = function ($) {

mw.util.addPortletLink( portletID = 'p-userbox', href = 'https://tools.wmflabs.org/userviews/?project=en.wikipedia.org&platform=all-access&agent=user&namespace=0&redirects=0&range=latest-20&sort=views&direction=1&view=list&user=' + mw.config.get('wgUserName'), text = 'User views', id = 'p-userviews' );

mw.util.addPortletLink( portletID = 'p-userbox', href = 'https://tools.wmflabs.org/xtools/pages/?user=' + mw.config.get('wgUserName') + '&project=en.wikipedia.org&namespace=0&redirects=noredirects', text = 'Created pages', id = 'p-createdpages' ) ;

mw.util.addPortletLink( portletID = 'p-userbox', href = 'https://xtools.wmflabs.org/topedits/en.wikipedia.org/' + mw.config.get('wgUserName'), text = 'Top Edits', id = 'p-topedits' );

mw.util.addPortletLink( portletID = 'p-userbox', href = 'https://tools.wmflabs.org/supercount/index.php?project=en.wikipedia.org&user=' + mw.config.get('wgUserName'), text = 'Supercount', id = 'p-supercount' );

mw.util.addPortletLink( portletID = 'p-userbox', href = 'https://en.wikipedia.org/wiki/Sp%C3%A9cial:Index/User:' + mw.config.get('wgUserName'), text = 'Subpages', id = 'p-souspages' );

}

$(document).ready(userbox);

});