User:CLoggermore/wikia.js

function getBackgroundColor { var bgColor = $('#WikiaPageBackground').css('background-color'); if (bgColor === 'transparent') { bgColor = $('#WikiaPage').css('background-color'); }   if (bgColor === 'transparent') { bgColor = $('#EditPageHeader').css('background-color'); }   return bgColor; } /*!bang*/ $('.wds-global-navigation__search-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",			me: "Message Wall",			/* Message Wall Greeting is required*/			mwg: "Message Wall Greeting",			/*Adoption is a custom namespace at Community Central*/			a: "Adoption",			b: "Bot scan",			f: "Forum",			ac: "Admin Central"		};		if (namespaces.hasOwnProperty(m[1])) {			$(this).val(namespaces[m[1]] + ":" + txt.substr(m[1].length + 2));		}	} }); /*Responsive mobile*/ $('head').append(''); /*Confirm box*/