Difference between revisions 271902 and 272248 on ptwikibooks

/**
 * TemplateScript
 * Adds a menu of configurable templates and scripts to the sidebar
 * @author: [[m:user:Pathoschild]] ([[meta:User:Pathoschild/Scripts/TemplateScript]])
 * @update-token: [[File:pathoschild/templatescript.js]]
 * @author: [[User:Helder.wiki]] (this configuration file)
 * @tracking: [[Special:GlobalUsage/User:Helder.wiki/Tools/TemplateScript.js]] ([[File:User:Helder.wiki/Tools/TemplateScript.js]])
 */
(contracted; show full)		replace: '<syntaxhighlight $1</syntaxhighlight>'
	},{
		// <tt>...</tt>
		find: /<tt>(.+?)<\/tt>/g,
		replace: '<code>$1</code>'
	},{
		// <center>...</center>
		find: /<center>(
.+[\s\S]*?)<\/center>/g,
		replace: '<div style="text-align: center;">$1</div>'
	},{
		// <big>...</big>
		find: /<big>(.+?)<\/big>/g,
		replace: '<div style="font-size: larger;">$1</div>'
	},{
		find: /\n\|-\s*bgcolor\s*=\s*#([0-9a-f]{6}|[0-9a-f]{3})\s*\n/gi,
(contracted; show full)			script: usingRegex
		});
	}
}

$.getScript( '//pt.wikibooks.org/w/index.php?title=User:Helder.wiki/Tools/Pathoschild/TemplateScript.js&action=raw&ctype=text/javascript', loadMyRegexTools );

}( mediaWiki, jQuery ) );