Jump to content

Wikipedia:WikiProject User scripts/Scripts/User Contribs Tabs

From Wikipedia, the free encyclopedia
// <pre><nowiki>

addOnloadHook(function() {
  if (mw.config.get('wgTitle').indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history
     return;
  if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk") {
     var username = encodeURIComponent( mw.config.get('wgTitle') );
     addPortletLink("p-cactions", mw.config.get('wgServer') + "/wiki/Special:Contributions/" + username, "contribs", "ca-contrib", "User contributions");
     addPortletLink("p-cactions", "http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=" + username + "&site=en.wiki.x.io", "count", "ca-editcount", "Edit count from Interiot's Tool1");
     addPortletLink("p-cactions", "http://www.math.ucla.edu/~aoleg/wp/rfa/edit_summary.cgi?user=" + username + "&site=en.wiki.x.io", "Summary", "ca-summary", "Edit Summary");
  }
});

// </nowiki></pre>