User:KurwaAntics/global.js

/* ********** Load scripts ********** */ importArticles({   type: "script",    articles: [        //"u:dev:Wikimarks/code.js",        //"u:dev:View Source/code.js",        //"u:dev:PurgeButton/code.js",        //"u:dev:Colors/code.js",        "u:dev:QuickDiff/code.js",        "u:dev:EditIntroButton/code.js",        "u:dev:DisplayTimer/code.js",        "u:dev:PortableCSSPad/code.js",        "u:dev:FindAndReplace/code.js",        "u:dev:ConsistentModules/code.js",        "u:dev:Message/code.js"    ] });

/* ********** Menu ********** */ var contextMenuHTML = ' \ \ Develop\ Personal CSS\ Personal JS\ Global CSS\ Global JS</a>\ </li>Site-wide CSS</a>\ </li>Site-wide JS</a>\ </li>Script imports</a>\ </li>Review status</a>\ </li>Sandbox</a>\ </li>Bypass cache</a>\ </li></ul>\ </li>';

$('.toolbar .tools').prepend(contextMenuHTML);

$('#searchInput, #search-v2-input').on('keyup', function{	var txt = $(this).val,		m = txt.match(/^\!([a-z]+) /),		namespaces;	if (m) {		namespaces = {			t: "Template",			mw: "MediaWiki",			s: "Special",			h: "Help",			m: "Module",			f: "File",			u: "User",			p: "Project",			c: "Category"		};		if (namespaces.hasOwnProperty(m[1])) {			$(this).val(namespaces[m[1]] + ":" + txt.substr(m[1].length + 2));		}	} });