Jump to content
Wikimedia Meta-Wiki

User:Phantomsteve/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
 // This file contains global JavaScript, loaded on every wiki.

 /**
  * Forces left-to-right layout and editing on RTL wikis.
  * @see https://meta.wikimedia.org/wiki/Force_ltr
  * @update-token [[File:pathoschild/forceltr.js]]
  */
 mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');

 /**
  * Ajax sysop
  * @see https://meta.wikimedia.org/wiki/Ajax_sysop
  * @update-token [[File:pathoschild/ajaxsysop.js]]
  */
 //mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');

 /**
  * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
  * @see https://meta.wikimedia.org/wiki/TemplateScript
  * @update-token [[File:pathoschild/templatescript.js]]
  */
 /*
 // <nowiki>
 $.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
 	pathoschild.TemplateScript.add([
 		{
 			name: 'bot done',
 			script: function(editor) {
 				return editor
 					.replace(/^(=+)\s+(.+?)\s+(1円).+/, '1ドル2ドル1ドル') // fix header syntax
 					.replace(/^(.+=)\n([\s\S]+)$/, '1ドル\n<div style="background:#E3F9DF; padding:0 10px; border:1px solid #AAA;">\n2ドル\n: done. ~~~\n</div>') // place formatted box & message
 					.appendEditSummary('re: done');
 			}
 		}
 	]);
 });
 // </nowiki>
 */

 /*###############################################
 ### UTC clock
 ### by [[w:User:AzaToth]]
 ###############################################*/
 mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript');

AltStyle によって変換されたページ (->オリジナル) /