Wikipedia:WikiProject User scripts/Scripts/User Contribs Tabs

This is the current revision of this page, as edited by Amorymeltzer (talk | contribs) at 14:31, 7 February 2021 (Amorymeltzer changed the content model of the page Wikipedia:WikiProject User scripts/Scripts/User Contribs Tabs from "wikitext" to "JavaScript": Page is javascript). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
// <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.wikipedia.org", "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.wikipedia.org", "Summary", "ca-summary", "Edit Summary");
  }
});

// </nowiki></pre>