Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Write your own! See Wikipedia:WikiProject User scripts/GuideaddOnloadHook(contribstab);//means «execute func_start later»functioncontribstab(){if(mw.config.get('wgNamespaceNumber')==2||mw.config.get('wgNamespaceNumber')==3){//If we're in User or User talk namespacevarpagename;varname1;varname2;name1=mw.config.get('wgPageName').indexOf(":");//Find the colon to separate User: prefixif(name1!=-1){//Skip it if we didn't find a colonname1=name1+1;pagename=mw.config.get('wgPageName').substring(name1);}else{pagename=mw.config.get('wgPageName');//if no colon, assume we have the user name already}name2=pagename.indexOf("/");//If it's a subpage, get root nameif(name2>0){//if we found a slash earlierpagename=pagename.substring(0,name2);}addPortletLink('p-cactions','/wiki/Special:Contributions/'+pagename,'Contributions',1,'View this user\'s contributions');//Add the button}//resumes here for non-user/UT pages}//Written by Jeremy McCracken April, 2008//Original file location http://en.wikipedia.org/wiki/User:JeremyMcCracken/contribstab.js