User:Andrybak/common.js

// mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' ); // wikipedia:en:MediaWiki:Gadget-HotCat.js mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/diff-permalink-2.js&action=raw&ctype=text/javascript');

$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function {	pathoschild.TemplateScript.add([ {			name: 'Dr, → Dr.', script: function(editor) { editor .replace(/Dr[,]/g, 'Dr.') .replace(/Dr[ ]/g, 'Dr. ') .appendEditSummary('fix abbrebiation "Dr."') .clickDiff; }		},		{			name: 'Wikitext cleanup', script: function(editor) { editor .replace(/\[\left|right) *; *$/gm, 'info-a = $1')					.replace(/usercategory =/g, 'usercategory =')					.replace(/description=Templates relating to (\[\[.*\]\])/g, 'topic=$1')					.replace(/\{\{ *(Category:.*?)\}\}/g, '[[:$1')					.appendEditSummary('cleaned up wikitext')					.clickDiff;			}		},	]); });