User:Gwern/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
importPage('Wikipedia:WikiProject User scripts/Scripts/Fix diff width'); // install [[User:Pilaf/Live_Preview]] page preview tool document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // User:Lupin/popups.js document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); popupDelay=1; popupHideDelay=.2; popupStructure='fancy2'; popupSubpopups=false; popupFixRedirs=true; popupRedirAutoClick='wpSave'; popupRedlinkRemoval=true; popupFixDabs=true; imagePopupsForImages=false; // jncsp-start The section below (up to jncsp-end) is maintained by [[Wikipedia:WikiProject_User_scripts/User-script_manager]] // jncsp-config addTab_ee addSinceTab addLastDiff addUserTabs add_testn_Tabs if (location.href == "http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/User-script_manager") document.write('<script type="text/javascript" src="http://en.wikipedia.org/w' + '/index.php?title=User:Jitse_Niesen/Client-side_preferences/Main.js&action=raw&ctype=text/javascript"></script>'); // From [[Wikipedia:WikiProject User_scripts/Scripts/test-enhanced]], revision 87954483 function tnaddlilink(url, name) { var na = document.createElement('a'); na.setAttribute('href', url); var txt = document.createTextNode(name); na.appendChild(txt); var li = document.createElement('li'); li.appendChild(na); return li; } function testn(number) { var page = prompt("Vandalism to which article?") var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "{{subst:" + number + "-n|" + page + "}} ~" + "~" + "~" + "~"; f.wpSummary.value = "Vandalism to [[" + page + "]] - warning " + number; f.submit(); } function wA() { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "{{subst:" + "welcome-anon-from|Where" + "}} ~" + "~" + "~" + "~"; f.wpSummary.value = "Welcome to Wikipedia!"; f.submit(); } function wap() { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "{{subst:" + "User:Where/pwelcome" + "}} ~" + "~" + "~" + "~"; f.wpSummary.value = "Use preview; also, welcome!"; f.submit(); } function es() { var f = document.editform, t = f.wpTextbox1; if (t.value.length > 0) t.value += '\n'; t.value += "==Edit summaries==\n{{subst:" + "Edit summary" + "}} ~" + "~" + "~" + "~"; f.wpSummary.value = "Please use edit summaries"; f.submit(); } function add_testn_tabs() { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; // Only add for pages with "Editing User talk:" somewhere in the title if (document.title.indexOf("Editing User talk:") != -1) { tabs.appendChild(tnaddlilink('javascript:es()', "ES")); tabs.appendChild(tnaddlilink('javascript:testn("test1")',"t1")); tabs.appendChild(tnaddlilink('javascript:testn("test1a")',"t1a")); tabs.appendChild(tnaddlilink('javascript:testn("test2")',"t2")); tabs.appendChild(tnaddlilink('javascript:testn("test2a")',"t2a")); tabs.appendChild(tnaddlilink('javascript:testn("test3")',"t3")); tabs.appendChild(tnaddlilink('javascript:testn("test4")',"t4")); tabs.appendChild(tnaddlilink('javascript:testn("bv")',"bv")); tabs.appendChild(tnaddlilink('javascript:testn("obscene")',"o")); tabs.appendChild(tnaddlilink('javascript:testn("joke")',"j")); tabs.appendChild(tnaddlilink('javascript:testn("welcomenpov")',"w-N")); tabs.appendChild(tnaddlilink('javascript:wA()',"w-A")); tabs.appendChild(tnaddlilink('javascript:wap()',"w-A-p")); }} addOnloadHook(add_testn_tabs); // From [[Wikipedia:WikiProject User_scripts/Scripts/Add_LI_link]], revision 73544143 function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) { if(key && title) { ta[id] = [key, title]; } else if(key) { ta[id] = [key, '']; } else if(title) { ta[id] = ['', title]; } } // re-render the title and accesskeys from existing code in wikibits.js akeytt(); return li; } // From [[Wikipedia:WikiProject User_scripts/Scripts/Add_tab]], revision 73544604 function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key) }; // From [[Wikipedia:WikiProject User_scripts/Scripts/User_tabs]], revision 73795341 //Please leave the following line //[[user:Where/usertabs]] addOnloadHook(function() { if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history return; } if (document.title.indexOf("User:") == 0 || document.title.indexOf("User talk:") == 0) { username_a = document.URL.match(/:.*:(.*)/); username=username_a[1]; addTab("http://en.wikipedia.org/wiki/Special:Contributions/" + username, "contrib", "ca-contrib", "contribs", ""); addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=" + username, "page moves", "ca-pagemoves", "page moves", ""); addTab("http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=" + username, "block log", "ca-blog", "blog", ""); addTab("http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiki_p&user=" + username, "edit count", "ca-kate", "kate", ""); } }); // From [[Wikipedia:WikiProject User_scripts/Scripts/Show_last_diff]], revision 67477415 //From http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510 // addLastDiff addOnloadHook(function () { z=document.getElementById("content").childNodes; for (var n=0;n<z.length;n++) { if (z[n].className=="firstHeading") { var pname=z[n].textContent ? z[n].textContent : z[n].innerText; } } var l=addTab("http://en.wikipedia.org/w/index.php?title=" + pname + "&diff=cur&oldid=prev", 'last', ''); l.lastChild.title="Show most recent diff"; }); //This is just a useful little function. function importPage(site){ document.write('<script type="text/javascript" src="/w/index.php?title=' + site + '&action=raw&ctype=text/javascript&dontcountme=s"><\/script>'); } //Import two prerequisites for some scripts. importPage('Wikipedia:WikiProject User scripts/Scripts/addLink'); importPage('Wikipedia:WikiProject User scripts/Scripts/addTab'); importPage('Wikipedia:WikiProject User scripts/Scripts/Get Page Name'); importPage('Wikipedia:WikiProject User scripts/Scripts/All diffs above here'); /////Edit-in-frame. fast and fun! document.write('<script src="' + 'http://de.wikipedia.org/w/index.php?title=Benutzer:ASM/quickedit.js' + '&action=raw&ctype=text/javascript"></script>'); var qeEnabled = true; // Activate Script? var qeEnableSection0 = false; // Enable QuickEdit link for section 0 (introduction)? /**** afd helper ****/ document.write('<script type="text/javascript"' + 'src="http://en.wikipedia.org/w/index.php?title=User:Jnothman/afd_helper/' + 'script.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); var afdh_summaryprompt = false; //Formats the article by removing excess whitespace and simplifying links. importPage('Wikipedia:WikiProject User scripts/Scripts/Formatter'); /* Syntax highlighter */ if(document.title.indexOf(".js") == -1) // Ignore pages that end in .js addOnloadHook(function () { /* CSS syntax highlighting */ multicommentRE = new RegExp('(/\\*[\\s\\S]*?\\*/)', 'g'); ruleRE = new RegExp('([^\\{]+)\\{([^\\}]+)\\}', 'g'); idselectorRE = new RegExp('(#[a-zA-Z0-9\-\_]+)\\b', 'g'); classselectorRE = new RegExp('(\\.[a-zA-Z0-9\-\_]+)\\b', 'g'); pairRE = new RegExp('([a-zA-Z-]+):([^;]+);', 'g'); css = document.getElementsByTagName('pre'); for (i = 0; i < css.length; i++) { c = css[i]; content = c.innerHTML; content=content.replace(multicommentRE, '<span class="comment">$1</span>'); content = content.replace(ruleRE, function(text, selector, body) { selector = selector.replace(idselectorRE, '<span class="idselector">$1</span>'); selector = selector.replace(classselectorRE, '<span class="classselector">$1</span>'); body = body.replace(pairRE, '<span class="property">$1</span>:<span class="value">$2</span>;'); return selector + '{' + body + '}'; }); c.innerHTML = content; } }); else /* Extreme Syntax highlighter (js)*/ importPage('User:Olliminatore/shCore.js'); // [[User:Olliminatore/shCore.js]] //This simplifies the sidebar to read "Edit" instead of "Edit this page". importPage('User:Ilmari Karonen/cologneblue/shorteditlinks.js'); ///////////////////////////////////////////////////////////////////////////////// //Omegatron's stuff ///////////////////////////////////////////////////////////////////////////////// /* <pre> */ /* I am experimenting with including everything using the winc() function, to keep this page clean and allow other people to include the functions they want into their own monobook.js the same way. Then theirs will be in sync with mine when I update it, etc. I've done the same with other users' scripts. Since moving them into other pages, though, it seems to be slower loading/refreshing a page? I think it's because it's loading scripts from multiple pages. I am putting my scripts in a subpage of monobook.js instead of a subpage of User:Omegatron, since it gives a link back to the main monobook.js. Convenient and logical (even if the address looks a little funny). If you know of a better way to do one of these functions or improve on one that I've written, please let me know. There's a script here that makes all the [[wikilinks]] in this page (and everywhere else) clickable, even in plain text mode. */ /* This function is used to include scripts from other Wikipedia pages in mine. I got it from [[User:Quarl/monobook.js]]. */ function winc(s) { s = s.replace(/^\[\[/, '').replace(/\]\]$/, ''); document.write('<scr' + 'ipt type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=' + s + '&action=raw&ctype=text/javascript&dontcountme=s"></scr' + 'ipt>'); } /* Included functions */ winc('[[User:Omegatron/monobook.js/addlink.js]]'); /* Adds links to lists on the page, such as the personal tools section */ winc('[[User:Omegatron/monobook.js/namedredirect.js]]'); /* Learning XMLHttpRequest while workarounding [[Bugzilla: 218]] */ /*winc('[[User:Omegatron/monobook.js/autolinker.js]]'); Make [[links]] and {{templates}} clickable */ /* This function is used to include individual scripts from Quarl's pages in mine. */ function qinc(s) { document.write('<scr' + 'ipt type="text/javascript" src="' + 'http://wikipedia.quarl.org/scripts/' + s + '.js"></scr' + 'ipt>'); } /* All kinds of scripts from [[User:Quarl]] */ qinc('module'); qinc('datetime'); qinc('msg'); qinc('util'); qinc('wikiwidget'); qinc('wikins'); qinc('wikipage'); qinc('wikiedit'); qinc('diff'); qinc('shortcuts'); qinc('diffsince'); qinc('wikiwatch'); qinc('watchlist'); qinc('watchbutton'); qinc('autofocus'); qinc('autosummary'); qinc('smartsubmit'); qinc('newmessages'); qinc('tabsince'); addOnloadHook(function () { $watchbutton.widgetLoad(); $tabsince.widgetLoad(); $watchlist.widgetLoad() /* uncomment this to hide alert() errors */ /* $msg.alert_disabled=true */ }); /* Move things around so that sidebar can be fixed in position and content can scroll independently */ /* See [[meta:Help:User style/floating quickbar]] */ addOnloadHook(function () { var content = document.getElementById("column-content"); // Find the main content column var footer = document.getElementById("footer"); // Find the footer footer.parentNode.removeChild(footer); // Remove the footer from the global wrapper content.appendChild(footer); // Place footer at the end of the content column; var tabs = document.getElementById("p-cactions"); // Find the top tab list tabs.parentNode.removeChild(tabs); // Remove the tab list from the side column content.insertBefore(tabs,content.firstChild); // Place tab list at the beginning of the content column }); /* Do some things when the page loads */ addOnloadHook(function () { /* Adds some links to my ''personal tools'' section ("My monobook.js", "My monobook.css", "My sandbox") */ addLink('p-personal', '/wiki/User:Gwern/monobook.js', 'My monobook.js', 'pt-monobookjs', 'monobook.js is used for storing user javascripts', ''); addLink('p-personal', '/wiki/User:Gwern/monobook.css', 'My monobook.css', 'pt-monobookcss', 'monobook.css is used for storing user CSS styles', ''); addLink('p-personal', '/w/index.php?title=Special%3AAllpages&from=Gwern&namespace=2', 'My subpages', 'pt-subpages', 'Subpages of my userspace', ''); /* Shorten "edit this page" to just "edit" */ if(document.getElementById('ca-edit')) { document.getElementById('ca-edit').firstChild.innerHTML = 'edit'; } }); /* Duplicate all the tabs from the top on the bottom of the content box, too. */ /* From [[Wikipedia:WikiProject User scripts/Scripts/Duplicate tabs at bottom]]. */ addOnloadHook(function () { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } var content = document.getElementById("content"); // Find the content div content.parentNode.insertBefore(tabs, content.nextSibling); // Place tab list right after content div }); document.write( '<st' + 'yle type="text/css"> ' + ' div.audiolinkbox { ' + ' border:2px solid rgb(170,170,170); ' + ' background-color:rgb(250,250,250); ' + ' position:absolute; ' + ' margin:-1.2em; ' + ' display:none; ' + ' } ' + '<' + '/style>' ); addOnloadHook(function () { function lightup () { this.parentNode.nextSibling.nextSibling.style.display="inline"; } function lightout () { this.parentNode.nextSibling.nextSibling.style.display="none"; } /* Get all the span tags */ spans = document.getElementsByTagName('span'); /* go through them all */ for (i=0;i<spans.length;i++) { /* If the span is class audiolinkinfo */ if (spans[i].className.indexOf("audiolinkinfo") != -1) { /* Put it in a box */ box = document.createElement('div'); box.className="audiolinkbox"; spans[i].parentNode.insertBefore(box,spans[i]); box.appendChild(spans[i]); /* Remove the parentheses */ insidebox = spans[i].firstChild for (j=0;j<insidebox.childNodes.length;j++) { if (insidebox.childNodes[j].textContent == "(" || insidebox.childNodes[j].textContent == ")") { insidebox.removeChild(insidebox.childNodes[j]) } } /* Add the hover thing to the regular link */ spans[i-1].firstChild.onmouseout=lightout; spans[i-1].firstChild.onmouseover=lightup; } } }); /* </pre> */ /* ==Always== <pre> <nowiki> */ /* Remember doesn't applly to pages outside main namespace */ msg="Ced "; insist=0; diff=1; preview=0; submit=0; function always(){ var txt = document.editform.wpTextbox1; temp=txt.value; /* if (temp.length<8) { txt.value="#redirect [[]]"; document.forms.editform.submit(); return; } */ txt.value = txt.value.replace(/ +(==+) *$/gm, "$1"); txt.value = txt.value.replace(/^(==+) +/gm, "$1"); txt.value = txt.value.replace(/{{(wikify|wiki|wfy)}}/gim, "{{Wikify|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/{{(cleanup|attention)}}/gim, "{{cleanup|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/{{Cleanup-section}}/gim, "{{cleanup-section|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/{{uncatstub}}/gim, "{{uncatstub|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/{{(unlinked|linkless|orphan)}}/gim, "{{orphan|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/{{(classify|categories needed|catneeded|categori(s|z)e|nocats*|categoryneeded|uncat|uncategori(s|z)ed)}}/gim, "{{uncategorized|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}"); txt.value = txt.value.replace(/\[\[ *(A|a)s *of *(January|February|March|April|May|June|July|August|September|October|November|December) *(\d\d\d\d) *\]\]/gm,"[[as of $3|$1s of $2 $3]]"); txt.value = txt.value.replace(/^(==+)\s*external\s*links*\s*(==+)/gim, "$1External links$1"); txt.value = txt.value.replace(/^(==+)\s*references*\s*(==+)/gim, "$1References$1"); if (temp==txt.value) {return;} document.forms.editform.wpSummary.value=msg; if (diff==1) {document.editform.wpDiff.click();} /* else if (preview==1) {document.editform.wpPreview.click();} */ else if (submit==1) {document.forms.editform.submit();} } /* </nowiki> </pre> ==Spelling - currently makes level 1 headers level 2== <pre> <nowiki> */ function spelling(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/\[\[\$\]\]/gm, "$"); /* txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)and and(\)|\>|\*|\||\(|\'|=|\s+)/gm, "$1and$2"); # txt.value = txt.value.replace(/(January|February|March|April|May|June|July|August|September|October|November|December)\s*0(\d)/ig, #"$2 $1") # txt.value = txt.value.replace(/0(\d)\s*(January|February|March|April|May|June|July|August|September|October|November|December)/ig, #"$1 $2") # txt.value = txt.value.replace(/(\W[Mm]illen)(ium\W)/gm, "$1n$2"); # txt.value = txt.value.replace(/(\W[Mm]ast)e(rbate\W)/gm, "$1u$2"); */ txt.value = txt.value.replace(/(\n)=/gm, "$1=="); txt.value = txt.value.replace(/=(\n)/gm, "==$1"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value + "Header levels"; document.editform.wpDiff.click(); } /* </nowiki> </pre> ==Simplify wikilinks== <pre> <nowiki> */ function decomma(){ var txt = document.editform.wpTextbox1; /* txt.value = txt.value.replace(/\[\[(.*)? (.*)?\]\]/g,"[[$1 $2]]"); txt.value = txt.value.replace(/\[\[ /g,"[["); txt.value = txt.value.replace(/ \]\]/g,"]]"); */ txt.value = txt.value.replace(/ ==$/gm, "=="); txt.value = txt.value.replace(/^== /gm, "=="); /* Pull text inside piped link */ txt.value = txt.value.replace(/\[\[([^\]\|]+)\|([^\]\|]+)\]\]([A-Za-z\'])([\w\d]*)([\.\,\;\:\"\!\?\s]+)/gm, "[[$1|$2$3$4]]$5"); /*De-pipe if possible */ txt.value = txt.value.replace(/\[\[([^\]\|]+)\|\1([^\]\|\-\'\s]*)\]\]/gm, "[[$1]]$2"); document.forms.editform.wpSummary.value="Simplified wikilink."; document.editform.wpDiff.click(); /* document.forms.editform.submit(); */ } /* </nowiki> </pre> ==Repeated links== <pre> <nowiki> */ function replink(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/\[\[([^\]\|]+)\|([^\]]*)\]\]([.\n]*)\[\[\1\|\2\]\]/gm, "[[$1|$2]]$3$2"); txt.value = txt.value.replace(/\[\[([^\]]+)\]\]([.\n]*)\[\[\1\]\]/gm, "[[$1]]$2$1"); document.forms.editform.wpSummary.value="Rm duplicate wikilink."; document.editform.wpDiff.click(); } /* </nowiki> </pre> ==Units== <pre> <nowiki> */ function census(){ var txt = document.editform.wpTextbox1; // Convert ° into � symbol txt.value = txt.value.replace(/°/g, '�'); txt.value = txt.value.replace(/�/g, '�'); // Convert &sup into superscript � symbol txt.value = txt.value.replace(/²/g, '�'); txt.value = txt.value.replace(/³/g, '�'); // Convert the word ohm(s) or the html entity into the actual symbol (Omega, not the actual ohm symbol Ω) and make sure it's spaced txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|�| |�|n|p|f|a|z|y)?\s?(Ω|ohm|Ohm)s?([\s,.\/\)])/g, '$1 $2 $4'); // Convert various micro symbols into the actual micro symbol, make sure it's spaced txt.value = txt.value.replace(/(\d)\s?(μ| |µ)(g|s|m|A|K|mol|cd|rad|sr|Hz|N|J|W|Pa|lm|lx|C|V| |F|Wb|T|H|S|Bq|Gy|Sv|kat|�C|M)([\s,.\/\)])/g, '$1 �$3$4'); // Convert capital K to lowercase k in units txt.value = txt.value.replace(/(\d)\s?K(g|s|m|A|K|mol|cd|rad|sr|Hz|N|J|W|Pa|lm|lx|C|V| |F|Wb|T|H|S|Bq|Gy|Sv|kat|�C|M)([\s,.\/\)])/g, '$1 k$2$3'); // Fix common spelling error txt.value = txt.value.replace(/celcius/gi, 'Celsius'); // Capitalize units correctly txt.value = txt.value.replace(/(\d)\s?(khz)([\s,.\/\)])/gi, '$1 kHz$3'); txt.value = txt.value.replace(/(\d)\s?(mhz)([\s,.\/\)])/gi, '$1 MHz$3'); txt.value = txt.value.replace(/(\d)\s?(ghz)([\s,.\/\)])/gi, '$1 GHz$3'); txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|�| |�|n|p|f|a|z|y)?(hz|HZ)([\s,.\/\)])/g, '$1 $2Hz$4'); txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|�| |�|n|p|f|a|z|y)?(pa|PA)([\s,.\/\)])/g, '$1 $2Pa$4'); // Fix kilometres txt.value = txt.value.replace(/(\d)\s?(kms)([\s,.\/\)])/gi, '$1 km$3'); txt.value = txt.value.replace(/(\d)\s?(km)([\s,.\/\)])/gi, '$1 km$3'); // Standardise kilometres per hour and add space txt.value = txt.value.replace(/(\d)\s?(km\/hr)([\s,.\/\)])/gi, '$1 km/h$3'); txt.value = txt.value.replace(/(\d)\s?(kph)([\s,.\/\)])/gi, '$1 km/h$3'); txt.value = txt.value.replace(/(\d)\s?(kmph)([\s,.\/\)])/gi, '$1 km/h$3'); // txt.value = txt.value.replace(/(\d)\s?(kmh)([\s,.\/\)])/gi, '$1 km/h$3'); // txt.value = txt.value.replace(/(\d)\s?(km\/h)([\s,.\/\)])/gi, '$1 km/h$3'); // Space before horsepower symbol txt.value = txt.value.replace(/(\d)\s?(hp)([\s,.@])/gi, '$1 hp$3'); txt.value = txt.value.replace(/(\d)\s?(bhp)([\s,.@])/gi, '$1 bhp$3'); txt.value = txt.value.replace(/(\d)\s?(shp)([\s,.@])/gi, '$1 shp$3'); // Space before other units txt.value = txt.value.replace(/(\d)\s?(cc)([\s,.\/\)])/gi, '$1 cc$3'); txt.value = txt.value.replace(/(\d)\s?(ml)([\s,.\/\)])/gi, '$1 ml$3'); txt.value = txt.value.replace(/(\d)\s?(mm)([\s,.\/\)])/gi, '$1 mm$3'); txt.value = txt.value.replace(/(\d)\s?(km)([\s,.\/\)])/gi, '$1 km$3'); // Standardise miles per hour and rpm txt.value = txt.value.replace(/(\d)\s?(m.p.h.)([\s,.\/\)])/gi, '$1 mph$3'); txt.value = txt.value.replace(/(\d)\s?(mph)([\s,.\/\)])/gi, '$1 mph$3'); txt.value = txt.value.replace(/(\d) (mph)([\s,.\/\)])/gi, '$1 mph$3'); txt.value = txt.value.replace(/(\d)\s?(rpm)([\s,.\/\)])/gi, '$1 rpm$3'); txt.value = txt.value.replace(/(\d) (rpm)([\s,.\/\)])/gi, '$1 rpm$3'); // Standardise symbol for pounds txt.value = txt.value.replace(/(\d)\s?lbs/gi, '$1 lb'); txt.value = txt.value.replace(/(\d\+?)\s?lbs/gi, '$1 lb'); txt.value = txt.value.replace(/(\d lb)s/gi, '$1'); txt.value = txt.value.replace(/(\d)\s?(\[\[lbs\]\])/gi, '$1 \[\[Pound (mass)|lb\]\]'); // Standardise symbol for foot pounds txt.value = txt.value.replace(/(\d)\s?(ft[ -. \/]lb[fs])/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d)\s?(lb[fs][ -. \/]ft)/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d)\s?(lb[ -. \/]ft)/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d)\s?(ft[ -. \/]lb)/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d) (lb[fs][ -. \/]ft)/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d) (ft[ -. \/]lb[fs])/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d) (lb[ -. \/]ft)/gi, '$1 ft�lbf'); txt.value = txt.value.replace(/(\d) (ft[ -. \/]lb)/gi, '$1 ft�lbf'); // Symbols for feet and inches txt.value = txt.value.replace(/([^;�]\s?\s?)(\d{1,4})\s?([' ])\s?(\d{1,2})\s?([" ])/gi, '$1$2 ft $4 in'); //txt.value = txt.value.replace(/([:=\/\(])\s*(\d{1,3)\s?([' ])\s?(1?\d)\s?([" ])/gi, '$1$2 ft $4 in'); //txt.value = txt.value.replace(/(1?\d)\s?([" ])/gi, '$1 in'); //txt.value = txt.value.replace(/(eight[:= ]{1,2})\s?(\d)-(\d{1,2})([\s,.\/\)])/gi, '$1 $2 ft $3 in'); // Give digital value a percent symbol '%' instead of word txt.value = txt.value.replace(/(\d)[\s?-]per *cent([^aei])/gi, '$1%$2'); // Add a space before dB or B txt.value = txt.value.replace(/(\d)\s?(dB|B)\b/g, '$1 $2'); // Add a space before any units that were missed before txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|�|n|p|f|a|z|y)?(g|m|A|K|mol|cd|rad|sr|Hz|N|J|W|Pa|lm|lx|C|V| |F|Wb|T|H|S|Bq|Gy|Sv|kat|�C|�F|M)([\s,.\\/)])/g, '$1 $2$3$4'); // Separate one for seconds since they give a lot of false positives like "1970s". Only difference is mandatory prefix. txt.value = txt.value.replace(/(\d)\s?(Y|Z|E|P|T|G|M|k|K|h|da|d|c|m|�|n|p|f|a|z|y)(s)([\s,.\/\)])/g, '$1 $2$3$4'); // bps or b/s or bits/s --> bit/s txt.value = txt.value.replace(/([KkMmGgTtPpEeYyZz])(bps|bits?\/s|b\/s)/g, ' $1bit/s'); txt.value = txt.value.replace(/(\d)\s?(bps)/gi, '$1 bit/s'); // Bps or byte/s or bytes/s --> B/s txt.value = txt.value.replace(/([KkMmGgTtPpEeYyZz])(Bps|bytes?\/s)/g, ' $1B/s'); // After that, make capitalization correct txt.value = txt.value.replace(/K(bit|B)\/s/g, 'k$1/s'); txt.value = txt.value.replace(/m(bit|B)\/s/g, 'M$1/s'); txt.value = txt.value.replace(/g(bit|B)\/s/g, 'G$1/s'); txt.value = txt.value.replace(/t(bit|B)\/s/g, 'T$1/s'); txt.value = txt.value.replace(/e(bit|B)\/s/g, 'E$1/s'); txt.value = txt.value.replace(/y(bit|B)\/s/g, 'Y$1/s'); txt.value = txt.value.replace(/z(bit|B)\/s/g, 'Z$1/s'); // Common error txt.value = txt.value.replace(/mibi(bit|byte)/g, 'mebi$1'); // Add a tag to the summary box var txt = document.editform.wpSummary; var summary = "units"; if (txt.value.indexOf(summary) == -1) { if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) { txt.value += " | "; } txt.value += summary; } // Press the diff button to check it document.editform.wpDiff.click() } /* </nowiki> </pre> ==Day slash dates== <pre> <nowiki> */ function slashdates(){ var txt = document.editform.wpTextbox1; /*Note a leading colon could well be an "EasyTimeline" */ txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)(\d\d\d\d)\/([0|1|2]?\d)\/([0|1|2|3]?\d)/gm, "$1[[$4 zz$3zz]] [[$2]]"); txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)([0|1|2|3]?\d)\/([0|1|2]?\d)\/(\d\d\d\d)/gm, "$1[[$2 zz$3zz]] [[$4]]"); txt.value = txt.value.replace(/\[\[0(\d) zz/gm, "[[$1 zz"); txt.value = txt.value.replace(/zz0(\d)zz/gm, "zz$1zz"); txt.value = txt.value.replace(/zz1zz/gm, "January"); txt.value = txt.value.replace(/zz2zz/gm, "February"); txt.value = txt.value.replace(/zz3zz/gm, "March"); txt.value = txt.value.replace(/zz4zz/gm, "April"); txt.value = txt.value.replace(/zz5zz/gm, "May"); txt.value = txt.value.replace(/zz6zz/gm, "June"); txt.value = txt.value.replace(/zz7zz/gm, "July"); txt.value = txt.value.replace(/zz8zz/gm, "August"); txt.value = txt.value.replace(/zz9zz/gm, "September"); txt.value = txt.value.replace(/zz10zz/gm, "October"); txt.value = txt.value.replace(/zz11zz/gm, "November"); txt.value = txt.value.replace(/zz12zz/gm, "December"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+"Wikify date(s) from xx/xx/xxx format."; } /* </nowiki> </pre> ==Month slash dates== <pre> <nowiki> */ function slashdatesm(){ /* month day year - pox. */ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)(\d+)\/(\d+)\/(\d\d\d\d)/gm, "$1[[$3 zz$2zz]] [[$4]]"); txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)(\d+)\/(\d+)\/(0\d)/gm, "$1[[$3 zz$2zz]] [[20$4]]"); txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)(\d+)\/(\d+)\/(9\d)/gm, "$1[[$3 zz$2zz]] [[19$4]]"); txt.value = txt.value.replace(/(\)|\>|\*|\||\(|\'|=|\s+)(\d+)\/(\d+)\/(8\d)/gm, "$1[[$3 zz$2zz]] [[19$4]]"); txt.value = txt.value.replace(/\[\[0(\d) zz/gm, "[[$1 zz"); txt.value = txt.value.replace(/zz0(\d)zz/gm, "zz$1zz"); txt.value = txt.value.replace(/zz1zz/gm, "January"); txt.value = txt.value.replace(/zz2zz/gm, "February"); txt.value = txt.value.replace(/zz3zz/gm, "March"); txt.value = txt.value.replace(/zz4zz/gm, "April"); txt.value = txt.value.replace(/zz5zz/gm, "May"); txt.value = txt.value.replace(/zz6zz/gm, "June"); txt.value = txt.value.replace(/zz7zz/gm, "July"); txt.value = txt.value.replace(/zz8zz/gm, "August"); txt.value = txt.value.replace(/zz9zz/gm, "September"); txt.value = txt.value.replace(/zz10zz/gm, "October"); txt.value = txt.value.replace(/zz11zz/gm, "November"); txt.value = txt.value.replace(/zz12zz/gm, "December"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+"Wikify date(s) from xx/xx/xxx format."; } /* </nowiki> </pre> ==British Old English== <pre> <nowiki> */ function british(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/\[\[Old English\]\]/gim, "[[Old English language|Old English]]"); txt.value = txt.value.replace(/\[\[Old English\|/gim, "[[Old English language|"); txt.value = txt.value.replace(/\[\[British\]\]/gim, "[[United Kingdom|British]]"); txt.value = txt.value.replace(/\[\[British\|/gim, "[[United Kingdom|"); txt.value = txt.value.replace(/\[\[United kingdom\]\]/gim, "[[United Kingdom]]"); txt.value = txt.value.replace(/\[\[United kingdom\|/gim, "[[United Kingdom|"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+"dab/red UK/OE."; } /* </nowiki> </pre> ==Math== <pre> <nowiki> */ function math(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/\\binom\s*\{([^\}]*)\}\s*\{([^\}]*)\}/gim, "{ $1 \\choose $2 }"); txt.value = txt.value.replace(/\$\s*(.*?)\s*\$/gim, "\<math\>$1\<\/math\>"); txt.value = txt.value.replace(/\\displaystyle/gim, ""); txt.value = txt.value.replace(/\\partial/gim, "\\part"); txt.value = txt.value.replace(/\\end\{array\}/gim, "\\end{matrix}"); txt.value = txt.value.replace(/\\begin\{array\}\s*\(11\)/gim, "\\begin{matrix}"); txt.value = txt.value.replace(/\\rvert/gim, "|"); txt.value = txt.value.replace(/\\lvert/gim, "|"); txt.value = txt.value.replace(/\.\<\/math\>/gim, "\<\/math\>\."); txt.value = txt.value.replace(/\,\<\/math\>/gim, "\<\/math\>\,"); txt.value = txt.value.replace(/\\mbox/gim, ""); txt.value = txt.value.replace(/\\mathscr/gim, ""); txt.value = txt.value.replace(/ /gim, "\""); txt.value = txt.value.replace(/ /gim, "\""); txt.value = txt.value + "<br>{{planetmath|id=|title=}} " txt.value = txt.value + "[[Category:combinatorics]]" document.forms.editform.wpSummary.value="Import from Planet Math"; } /* </nowiki> </pre> ==bold== <pre> <nowiki> */ function bold(){ var txt = document.editform.wpTextbox1; /* var title = document.title.value; txt.value = txt.value.replace(/\<\/b\>/gim, "'''"); */ txt.value = txt.value.replace(/\<\/b\>/gim, "'''"); txt.value = txt.value.replace(/\<\/i\>/gim, "''"); txt.value = txt.value.replace(/\<b\>/gim, "'''"); txt.value = txt.value.replace(/\<i\>/gim, "''"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+"Bold/Italics"; } /* </nowiki> </pre> ==datesplus== <pre> <nowiki> */ function datesplus(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace( /(\[\[\d*\s*(?:January|February|March|April|May|June|July|August|September|October|November|December)\s*\d*\]\])[,]*\s*(\d{4})/gim, "$1 [[$2]]"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+" Wikify dates(year part, where month and day present). "; } /* </nowiki> </pre> ==Dates== <pre> <nowiki> */ function dates(){ var txt = document.editform.wpTextbox1; /* if (document.forms.editform.wpSummary.value=="Wikify dates") { document.forms.editform.submit(); } else */ if(txt.value.indexOf("opyvio") == -1){ /* Ranges of days within months */ txt.value = txt.value.replace(/(January|February|March|April|May|June|July|August|September|October|November|December)\s*(\d{1,2})\s*-\s*(\d{1,2})(\D)/gm,"$1 $3-$2 $3$4"); txt.value = txt.value.replace(/(\d{1,2})\s*-\s*(\d{1,2})\s*(January|February|March|April|May|June|July|August|September|October|November|December)/gm,"$1 $3-$2 $3"); /* standard formats */ txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(January|February|March|April|May|June|July|August|September|October|November|December)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 $3]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(January|February|March|April|May|June|July|August|September|October|November|December)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$2 $3]] [[$4]]"); txt.value = txt.value.replace(/([^=\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(January|February|March|April|May|June|July|August|September|October|November|December)(\W+)/gim, "$1[[$2 $3]]$4"); txt.value = txt.value.replace(/([^=\[\d])(January|February|March|April|May|June|July|August|September|October|November|December)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$2 $3]]$4"); /* The xxx th of yyy */ txt.value = txt.value.replace(/(?:the)?(?:\s)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd)?(?:\s*of\s*)(January|February|March|April|May|June|July|August|September|October|November|December)(?:[\s,]*)(\d{3,4})/gim, "[[$1 $2]] [[$3]]"); txt.value = txt.value.replace(/(?:the)?(?:\s)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd)?(?:\s*of\s*)(January|February|March|April|May|June|July|August|September|October|November|December)(\W+)/gim, "[[$1 $2]]$3"); /* xx th of yyy txt.value = txt.value.replace(/([^=\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(January|February|March|April|May|June|July|August|September|October|November|December)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 $3]] [[$4]]"); txt.value = txt.value.replace(/([^=\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*of\s*)(January|February|March|April|May|June|July|August|September|October|November|December)(\W+)/gim, "$1[[$2 $3]]$4"); */ /* jan.... */ txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Jan\.?|January)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 January]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Jan\.?|January)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 January]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Jan\.?|January)(\W+)/gim, "$1[[$2 January]]$4"); txt.value = txt.value.replace(/([^\[\d])(Jan\.?|January])(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 January]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Feb)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 February]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Feb\.?|February)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 February]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Feb)(\W+)/gim, "$1[[$2 February]]$4"); txt.value = txt.value.replace(/([^\[\d])(Feb\.?|February)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 February]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Mar)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 March]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Mar\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 March]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Mar)(\W+)/gim, "$1[[$2 March]]$4"); txt.value = txt.value.replace(/([^\[\d])(Mar\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 March]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Apr)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 April]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Apr\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 April]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Apr)(\W+)/gim, "$1[[$2 April]]$4"); txt.value = txt.value.replace(/([^\[\d])(Apr\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 April]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Jun)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 June]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Jun\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 June]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Jun)(\W+)/gim, "$1[[$2 June]]$4"); txt.value = txt.value.replace(/([^\[\d])(Jun\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 June]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Jul)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 July]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Jul\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 July]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Jul)(\W+)/gim, "$1[[$2 July]]$4"); txt.value = txt.value.replace(/([^\[\d])(Jul\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 July]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Aug)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 August]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Aug\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 August]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Aug)(\W+)/gim, "$1[[$2 August]]$4"); txt.value = txt.value.replace(/([^\[\d])(Aug\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 August]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Sep|Sept)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 September]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Sep\.?|Sept\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 September]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Sep|Sept)(\W+)/gim, "$1[[$2 September]]$4"); txt.value = txt.value.replace(/([^\[\d])(Sep\.?|Sept\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 September]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Oct)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 October]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Oct\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 October]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Oct)(\W+)/gim, "$1[[$2 October]]$4"); txt.value = txt.value.replace(/([^\[\d])(Oct\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 October]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Nov)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 November]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Nov\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 November]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Nov)(\W+)/gim, "$1[[$2 November]]$4"); txt.value = txt.value.replace(/([^\[\d])(Nov\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 November]]$4"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s*)(Dec)(?:[\s,]*)(\d{3,4})/gim, "$1[[$2 December]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(Dec\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|st|rd|nd|)(?:[\s,]+)(\d{3,4})/gim, "$1[[$3 December]] [[$4]]"); txt.value = txt.value.replace(/([^\[\d])(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:\s*)(?:th|rd|st|nd|)(?:\s)(Dec)(\W+)/gim, "$1[[$2 December]]$4"); txt.value = txt.value.replace(/([^\[\d\_])(Dec\.?)(?:\s*)(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)(?:th|rd|st|nd|)([^\w])/gi, "$1[[$3 December]]$4"); document.forms.editform.wpSummary.value=document.forms.editform.wpSummary.value+"Wikify dates (where month and day both present)."; document.editform.wpDiff.click(); /*document.forms.editform.submit(); */ } /* if not a copyvio */ } /* </nowiki> </pre> ==Dewikify dates== <pre> <nowiki> */ function dewikifydates() { var txt = document.editform.wpTextbox1; // century txt.value = txt.value.replace(/\[\[(\d{1,2}(?:st|nd|rd|th))[ -](century)\]\]/gi, '$1 century'); txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th))\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th)[ -]century)\]\]/gi, '$1 century'); txt.value = txt.value.replace(/\[\[\d{1,2}(?:st|nd|rd|th)[ -]century\|(\d{1,2}(?:st|nd|rd|th))[ -](centuries)\]\]/gi, '$1 centuries'); // decades txt.value = txt.value.replace(/\[\[(\d{1,4}s)\]\]/gi, '$1'); // months txt.value = txt.value.replace(/\[\[(January|February|March|April|May|June|July|August|September|October|November|December)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[January\|(Jan)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[February\|(Feb)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[March\|(Mar)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[April\|(Apr)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[May\|(May)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[June\|(Jun)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[July\|(Jul)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[August\|(Aug)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[September\|(Sep)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[October\|(Oct)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[November\|(Nov)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[December\|(Dec)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[((?:January|February|March|April|May|June|July|August|September|October|November|December) \d{3,4})\]\]/gi, '$1'); // days of the week including optional plurals txt.value = txt.value.replace(/\[\[(Mondays?|Tuesdays?|Wednesdays?|Thursdays?|Fridays?|Saturdays?|Sundays?)\]\]/gi, '$1'); // days of the week but leave out 'Sun' as potentially valid link to the Sun txt.value = txt.value.replace(/\[\[(Mon|Tue|Tues|Wed|Thu|Thur|Thurs|Fri|Sat)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Mondays?\|(Mondays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Tuesdays?\|(Tuesdays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Wednesdays?\|(Wednesdays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Thursdays?\|(Thursdays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Fridays?\|(Fridays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Saturdays?\|(Saturdays?)\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[Sundays?\|(Sundays?)\]\]/gi, '$1'); // ranked days txt.value = txt.value.replace(/\[\[(\d{1,2}(?:st|nd|rd|th))\]\]/gi, '$1'); // misconfigured txt.value = txt.value.replace(/\[\[((?:January|February|March|April|May|June|July|August|September|October|November|December) \d{1,2}(?:st|nd|rd|th))\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[(?:January|February|March|April|May|June|July|August|September|October|November|December) \d{1,2}\|(\d{1,2})\]\]/gi, '$1'); // year //BC etc txt.value = txt.value.replace(/\[\[(\d{1,4} (?:AD|BC|CE|BCE))\]\]/gi, '$1'); txt.value = txt.value.replace(/\[\[\d{1,4} (?:AD|BC|CE|BCE)\|(\d{1,4})\]\]/gi, '$1'); //4 digits years piped into 2 txt.value = txt.value.replace(/\[\[\d{1,4}\|(\d{1,2})\]\]/gi, '$1'); var x=0; while (x<3) {x++; //year: text on left, avoid links on right txt.value = txt.value.replace(/([\w\(\);:.\*\|\&]\s?,?\-?\s?)\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3'); //year pair: text on left, avoid links on right txt.value = txt.value.replace(/([\w\(\);:.\*\|\&]\s?,?\-?\s?)\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3$4$5'); //year:avoid links on left, text on right txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\](\s?,?\-?\s?[\w\(\);:.\*\|\&])/gi, '$1$2$3'); //year pair: avoid links on left, text on right txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\](\s?,?\-?\s?[\w\(\);:.\*\|\&])/gi, '$1$2$3$4$5'); //year:avoid links on both sides txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3'); //year pair: avoid links on both sides txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3$4$5'); //year: last character in link on left is not month or digit, avoid links on right txt.value = txt.value.replace(/([^yhletr\d]\]\]\s?,?\-?\s?)\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3'); //year pair: last character in link on left is not month or digit, avoid links on right txt.value = txt.value.replace(/([^yhletr\d]\]\]\s?,?\-?\s?)\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\]([^\[]{4})/gi, '$1$2$3$4$5'); //year: avoid links on left, first character in link on right is not month or digit txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\](\s?,?\-?\s?\[\[[^jfmasond\d])/gi, '$1$2$3'); //year pair: avoid links on left, first character in link on right is not month or digit txt.value = txt.value.replace(/([^\]]{4})\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\](\s?,?\-?\s?\[\[[^jfmasond\d])/gi, '$1$2$3$4$5'); //year: last character in link on left is not month or digit, first character in link on right is not month or digit txt.value = txt.value.replace(/([^yhletr\d]\]\]\s?,?\-?\s?)\[\[(\d{1,4})\]\](\s?,?\-?\s?\[\[[^jfmasond\d])/gi, '$1$2$3'); //year pair: last character in link on left is not month or digit, first character in link on right is not month or digit txt.value = txt.value.replace(/([^yhletr\d]\]\]\s?,?\-?\s?)\[\[(\d{1,4})\]\](.?.?.?.?.?.?)\[\[(\d{1,4})\]\](\s?,?\-?\s?\[\[[^jfmasond\d])/gi, '$1$2$3$4$5'); } // Add a tag to the summary box var txt = document.editform.wpSummary; var summary = "Date fragments delinked."; if (txt.value.indexOf(summary) == -1) { if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) { txt.value += " "; } txt.value += summary; } // Press the diff button to check it document.editform.wpDiff.click() } /* </nowiki> </pre> ==Cardinals== <pre> <nowiki> */ function cardinals(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/ 10( |\. |\, )/gm, " ten$1"); txt.value = txt.value.replace(/ 11( |\. |\, )/gm, " eleven$1"); txt.value = txt.value.replace(/ 12( |\. |\, )/gm, " twelve$1"); txt.value = txt.value.replace(/ 13( |\. |\, )/gm, " thirteen$1"); txt.value = txt.value.replace(/ 14( |\. |\, )/gm, " fourteen$1"); txt.value = txt.value.replace(/ 15( |\. |\, )/gm, " fifteen$1"); txt.value = txt.value.replace(/ 16( |\. |\, )/gm, " sixteen$1"); txt.value = txt.value.replace(/ 17( |\. |\, )/gm, " seventeen$1"); txt.value = txt.value.replace(/ 18( |\. |\, )/gm, " eighteen$1"); txt.value = txt.value.replace(/ 19( |\. |\, )/gm, " nineteen$1"); txt.value = txt.value.replace(/ 20( |\. |\, )/gm, " twenty$1"); txt.value = txt.value.replace(/ 30( |\. |\, )/gm, " thirty$1"); txt.value = txt.value.replace(/ 40( |\. |\, )/gm, " forty$1"); txt.value = txt.value.replace(/ 50( |\. |\, )/gm, " fifty$1"); txt.value = txt.value.replace(/ 60( |\. |\, )/gm, " sixty$1"); txt.value = txt.value.replace(/ 70( |\. |\, )/gm, " seventy$1"); txt.value = txt.value.replace(/ 80( |\. |\, )/gm, " eighty$1"); txt.value = txt.value.replace(/ 90( |\. |\, )/gm, " ninety$1"); txt.value = txt.value.replace(/ 100( |\. |\, )/gm, " one hundred$1"); txt.value = txt.value.replace(/ 2(\d)( |\. |\, )/gm, " twenty $1$2"); txt.value = txt.value.replace(/ 3(\d)( |\. |\, )/gm, " thirty $1$2"); txt.value = txt.value.replace(/ 4(\d)( |\. |\, )/gm, " forty $1$2"); txt.value = txt.value.replace(/ 5(\d)( |\. |\, )/gm, " fifty $1$2"); txt.value = txt.value.replace(/ 6(\d)( |\. |\, )/gm, " sixty $1$2"); txt.value = txt.value.replace(/ 7(\d)( |\. |\, )/gm, " seventy $1$2"); txt.value = txt.value.replace(/ 8(\d)( |\. |\, )/gm, " eighty $1$2"); txt.value = txt.value.replace(/ 9(\d)( |\. |\, )/gm, " ninety $1$2"); txt.value = txt.value.replace(/ 1( |\. |\, )/gm, " one$1"); txt.value = txt.value.replace(/ 2( |\. |\, )/gm, " two$1"); txt.value = txt.value.replace(/ 3( |\. |\, )/gm, " three$1"); txt.value = txt.value.replace(/ 4( |\. |\, )/gm, " four$1"); txt.value = txt.value.replace(/ 5( |\. |\, )/gm, " five$1"); txt.value = txt.value.replace(/ 6( |\. |\, )/gm, " six$1"); txt.value = txt.value.replace(/ 7( |\. |\, )/gm, " seven$1"); txt.value = txt.value.replace(/ 8( |\. |\, )/gm, " eight$1"); txt.value = txt.value.replace(/ 9( |\. |\, )/gm, " nine$1"); document.forms.editform.wpSummary.value += " cardinals"; } /* </nowiki> </pre> ==Ordinals== <pre> <nowiki> */ function ordinals(){ var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(/ 10th/gm, " tenth"); txt.value = txt.value.replace(/ 11th/gm, " eleventh"); txt.value = txt.value.replace(/ 12th/gm, " twelfth"); txt.value = txt.value.replace(/ 13th/gm, " thirteenth"); txt.value = txt.value.replace(/ 14th/gm, " fourteenth"); txt.value = txt.value.replace(/ 15th/gm, " fifteenth"); txt.value = txt.value.replace(/ 16th/gm, " sixteenth"); txt.value = txt.value.replace(/ 17th/gm, " seventeenth"); txt.value = txt.value.replace(/ 18th/gm, " eighteenth"); txt.value = txt.value.replace(/ 19th/gm, " nineteenth"); txt.value = txt.value.replace(/ 20th/gm, " twentieth"); txt.value = txt.value.replace(/ 30th/gm, " thirtieth"); txt.value = txt.value.replace(/ 40th/gm, " fortieth"); txt.value = txt.value.replace(/ 50th/gm, " fiftieth"); txt.value = txt.value.replace(/ 60th/gm, " sixtieth"); txt.value = txt.value.replace(/ 70th/gm, " seventieth"); txt.value = txt.value.replace(/ 80th/gm, " eightieth"); txt.value = txt.value.replace(/ 90th/gm, " ninetieth"); txt.value = txt.value.replace(/ 2(\d)(st|nd|rd|th)/gm, " twenty $1$2"); txt.value = txt.value.replace(/ 3(\d)(st|nd|rd|th)/gm, " thirty $1$2"); txt.value = txt.value.replace(/ 4(\d)(st|nd|rd|th)/gm, " forty $1$2"); txt.value = txt.value.replace(/ 5(\d)(st|nd|rd|th)/gm, " fifty $1$2"); txt.value = txt.value.replace(/ 6(\d)(st|nd|rd|th)/gm, " sixty $1$2"); txt.value = txt.value.replace(/ 7(\d)(st|nd|rd|th)/gm, " seventy $1$2"); txt.value = txt.value.replace(/ 8(\d)(st|nd|rd|th)/gm, " eighty $1$2"); txt.value = txt.value.replace(/ 9(\d)(st|nd|rd|th)/gm, " ninety $1$2"); txt.value = txt.value.replace(/ 1st/gm, " first"); txt.value = txt.value.replace(/ 2nd/gm, " second"); txt.value = txt.value.replace(/ 3rd/gm, " third"); txt.value = txt.value.replace(/ 4th/gm, " fourth"); txt.value = txt.value.replace(/ 5th/gm, " fifth"); txt.value = txt.value.replace(/ 6th/gm, " sixth"); txt.value = txt.value.replace(/ 7th/gm, " seventh"); txt.value = txt.value.replace(/ 8th/gm, " eighth"); txt.value = txt.value.replace(/ 9th/gm, " ninth"); document.forms.editform.wpSummary.value += " ordinals"; } /* </nowiki> </pre> ==myLoadFuncs== <pre> <nowiki> */ function myLoadFuncs(){ addPurge(); addEditSection0(); changeLinks(); if(document.title.indexOf("Wikipedia:Articles for deletion") != -1 && document.title.indexOf("Editing ") != 0) afdlinks(); morelinks(); } /* </nowiki> </pre> ==main== <pre> <nowiki> */ if (window.addEventListener) window.addEventListener("load",myLoadFuncs,false); else if (window.attachEvent) window.attachEvent("onload",myLoadFuncs); else{ window._old_ABCD_onload = window.onload; window.onload = function(){ window._old_ABCD_onload(); myLoadFuncs(); } } /* </nowiki> </pre>*/ importScript('User:AzaToth/morebits.js'); importScript('User:AzaToth/twinklefluff.js'); importScript('User:AzaToth/twinklediff.js'); // Script from [[User:Haza-w/cactions.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Haza-w/cactions.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></s'+'cript>'); var ctOriginalTabs = 1; var ctEditIntro = 1; // Script from [[User:Tra/sidebartranslate.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Tra/sidebartranslate.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></s'+'cript>'); //<nowiki> Admin-like RC Patrol tools document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Voice of All/nolupin/monobook.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //</nowiki>[[Category:Wikipedians who use RC script ]] // UTC clock document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Approvals.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // // Script from [[User:Dr pda/persondata.js]] importScript('User:Dr pda/persondata.js'); //[[User:Dr pda/persondata.js]]