User:Razimantv/vector.js

$(document).ready(function {     if(mw.config.get('wgNamespaceNumber')==2||wgNamespaceNumber==3){            if ( mw.config.get('wgTitle').indexOf("/") == -1 )             {                    username = mw.config.get('wgTitle');            }             else             {                    username = mw.config.get('wgTitle').substring(0, mw.config.get('wgTitle').indexOf("/"));            }            mediaWiki.util.addPortletLink('p-cactions', "http://en.wikipedia.org/wiki/Special:PrefixIndex/User:"+username+"/", "Subpages", "tv-subpages", "User subpages");            mediaWiki.util.addPortletLink('p-cactions', "http://en.wikipedia.org/wiki/Special:Contributions/"+username, "Contributions", "tv-contribs", "User contributions");    } });