Jump to content
Wikimedia Meta-Wiki

User:Phantomsteve/global.js

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Pathoschild (talk | contribs) at 02:10, 20 March 2015 (updated scripts). It may differ significantly from the current version .

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.
 // <source lang="javascript">
 // This file contains global JavaScript, loaded on every wiki.

 /**
  * Forces left-to-right layout and editing on RTL wikis.
  * @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
  * @update-token [[File:pathoschild/forceltr.js]]
  */
 mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');

 /**
  * Ajax sysop
  * @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
  * @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]]
  */
 /*$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
 	pathoschild.TemplateScript.Add([
 		{
 			name: 'bot done',
 			script: function() {
 				var $edit = $('#wpTextbox1'), $reason = $('#wpSummary'), text = $edit.val();

 				// fix header syntax
 				text = text.replace(/^(=+)\s+(.+?)\s+(1円).+/, '1ドル2ドル1ドル');

 				// place formatted box & message
 				text = text.replace(/^(.+=)\n([\s\S]+)$/, '1ドル\n<div style="background:#E3F9DF; padding:0 10px; border:1px solid #AAA;">\n2ドル\n: done. ~~~\n</div>');

 				// update form
 				$edit.val(text);
 				$reason.val($reason.val() + 're: done');
 			},
 			forActions: 'edit'
 		}
 	]);
 });*/

 /*###############################################
 ### 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');
 // </source>

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