Difference between revisions 240021 and 240025 on ptwikibooks

/*


TemplateScript adds a menu of configurable templates and scripts to the sidebar.
For more information, see <https://github.com/Pathoschild/Wikimedia-contrib#readme>.


*/
(contracted; show full)
			// initialize
			this.Context.singleton = this;
			this.Context.$target = $('#wpTextbox1, #wpReason, #wpComment, #mwProtect-reason, #mw-bi-reason').first();
			this.Context.$editSummary = $('#wpSummary:first');

			// load utilities & hook into page
			this._LoadDependency('
https://raw.github.com/Pathoschild/Wikimedia-contrib/master/pathoschild.util.js//pt.wikibooks.org/w/index.php?title=User:Helder.wiki/Tools/Pathoschild/Util.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400', pathoschild.util, function() {
				this._isReady = true;
				for (var i = 0; i < this._queue.length; i++)
					this.Add(this._queue[i]);
			});
		},

		/**
(contracted; show full)		mw.loader.using(['ext.vector.collapsibleNav'], function() { $(init); });
	else
		$(init);

	pathoschild.TemplateScript.Add({
		name: 'Regex editor',
		script: function(context) {
			pathoschild.TemplateScript._LoadDependency('
https://raw.github.com/Pathoschild/Wikimedia-contrib/master/pathoschild.regexeditor.js//pt.wikibooks.org/w/index.php?title=User:Helder.wiki/Tools/Pathoschild/RegexEditor.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400', pathoschild.RegexEditor, function() {
				pathoschild.RegexEditor.Create(context.$target);
			});
		},
		forActions: 'edit'
	});
}());