MediaWiki:!bang/code.js

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