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.
/////////////////////////////////////////////////////////////////////////////////// [[User:Lupin/popups.js]] - please include this line mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'+'&action=raw&ctype=text/javascript&dontcountme=s');popupDelay=2.0;simplePopups=true;popupAdminLinks=true;window.onload=Main;functionMain(){//changelinks();//addtoolboxlinks()//addpurge();morelinks();//LivePreviewInstall();addPipesToHistory();document.getElementById("ca-talk").removeAttribute("acccesskey");if(document.getElementById("ca-unwatch"))document.getElementById("ca-unwatch").removeAttribute("acccesskey");}// Add a pipe to make using Template:Unsigned2 easier.functionaddPipesToHistory(){if(document.title.indexOf("- History -")>0){varitems=getElementsByClass(document,"history-user","span");for(i=0;i<items.length;i++){varhidden=document.createElement("span");hidden.appendChild(document.createTextNode("|"));hidden.setAttribute("style","color: white;");items[i].childNodes[0].insertBefore(hidden,items[i].childNodes[0].childNodes[0]);}}}functionreplace(){vars=prompt("Search regexp?");if(s){varr=prompt("Replace regexp?");if(!r&&r!='')return;vartxt=document.editform.wpTextbox1;txt.value=txt.value.replace(newRegExp(s,"g"),r);}}//<nowiki>functionmorelinks(){vartabs=document.getElementById('p-cactions').getElementsByTagName('ul')[0];if(document.title.indexOf("Editing ")==0){addlilink(tabs,'javascript:replace()','replace','');addlilink(tabs,"javascript:insertTags(' <span class=\"user-sig user-horsepunchkid\">~~~ <span class=\"user-sig-date\">"+getISO8601Date()+" "+getISO8601Time()+"[[ISO 8601|Z]]</span></span>','','')",'sign','s');document.getElementById("wpSave").removeAttribute("acccesskey");}}//</nowiki>functiongetISO8601Date(){vard=newDate();return(""+d.getUTCFullYear()+"-"+(d.getUTCMonth()<9?"0":"")+(d.getUTCMonth()+1)+"-"+(d.getUTCDate()<10?"0":"")+d.getUTCDate());}functiongetISO8601Time(){vard=newDate();return(""+(d.getUTCHours()<10?"0":"")+d.getUTCHours()+":"+(d.getUTCMinutes()<10?"0":"")+d.getUTCMinutes()+":"+(d.getUTCSeconds()<10?"0":"")+d.getUTCSeconds());}/////////////////////////////////////////////////////////////////////////////////// Wikipedia:WikiProject User scripts/Scripts/Changes since I last editedfunctionaddSinceTab(){vartabs=document.getElementById('p-cactions').getElementsByTagName('ul')[0];if(window.___location.href.indexOf("&action=history&gotosince=true")!=-1)do_since_I_last_edited();elseif(!/wiki\/Special:|w\/index.php?title=Special:/.test(window.___location.href)){varpageTitle=document.title.slice(0,String(document.title).indexOf(" - "));varl=addlilink(tabs,"/w/index.php?title="+pageTitle+"&action=history&gotosince=true",'since','');l.lastChild.title="Changes since I last edited";}}functiondo_since_I_last_edited(){varcsub=document.getElementById("contentSub");varmsg=document.createElement("p");msg.appendChild(document.createTextNode("Parsing history, please wait..."));msg.className="error";csub.insertBefore(msg,csub.firstChild);varusername=document.getElementById("pt-userpage").textContent;varusers=getElementsByClass(document,"history-user","span");for(i=0;i<users.length;i++){if(users[i].textContent==username){document.___location=users[i].parentNode.childNodes[1].href;return;}}msg.replaceChild(document.createTextNode("You have not edited this page recently."),msg.firstChild);}if(window.addEventListener)window.addEventListener("load",addSinceTab,false);elseif(window.attachEvent)window.attachEvent("onload",addSinceTab);/////////////////////////////////////////////////////////////////////////////////// Helper function; see Wikipedia:WikiProject User scripts/Scripts/Add LI linkfunctionaddlilink(tabs,url,name,id,title,key){varna=document.createElement('a');na.href=url;na.appendChild(document.createTextNode(name));varli=document.createElement('li');if(id)li.id=id;li.appendChild(na);tabs.appendChild(li);if(id){if(key&&title)ta[id]=[key,title];elseif(key)ta[id]=[key,''];elseif(title)ta[id]=['',title];}// re-render the title and accesskeys from existing code in wikibits.jsakeytt();return(li);}/////////////////////////////////////////////////////////////////////////////////// http://www.dustindiaz.com/getelementsbyclassfunctiongetElementsByClass(node,searchClass,tag){varclassElements=newArray();varels=node.getElementsByTagName(tag);varelsLen=els.length;varpattern=newRegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}returnclassElements;}