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.
/*TEST OF JAVASCRIPT EDITTOOLSTo try out this feature, add the following lines to your monobook.js: importScript("User:Ilmari Karonen/edittoolstest.js"); window.testJsEdittools = true;To deploy this feature sitewide, the code below should be copied to [[MediaWiki:Common.js]],while the code at [[User:Ilmari Karonen/edittools.js]] should be moved to [[MediaWiki:Edittools.js]].After 30 days have passed (to allow time for browser caches to purge), the #editpage-specialcharsdiv and everything in it in [[MediaWiki:Edittools]] should be replaced with: <div id="editpage-specialchars" class="edittools-version-0001"></div>During the 30-day interval between initial and full deployment (while the class name still has "test"in it), the code may be tested simply by setting "window.testJsEdittools = true". It should be safeto run this script more than once: it will only work the first time, after that it will have removedthe #editpage-specialchars div and so will no longer do anything.*/if(wgAction=='edit'||wgAction=='submit')addOnloadHook(function(){varplaceholder=document.getElementById("editpage-specialchars");if(!placeholder||window.noDefaultEdittools)return;varmatch=/(?:^| )edittools-version-(\d+)(?: |$)/.exec(placeholder.className);if(!match&&window.testJsEdittools)match=/(?:^| )edittools-version-(test\d+)(?: |$)/.exec(placeholder.className);if(!match)return;varurl=wgScript+'?title=User:Ilmari_Karonen/edittools.js&action=raw&ctype=text/javascript&nocache='+match[1];// var url = wgScript + '?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=' + match[1];if(window.importScriptURI){mw.loader.load(url);}else{// while waiting for a scap...varscriptElem=document.createElement('script');scriptElem.setAttribute('src',url);scriptElem.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(scriptElem);}});