User:Filthycasual420/common.js

$.when($.ready, mw.loader.using(["mediawiki.api", "mediawiki.jqueryMsg"])).then(function{	return new mw.Api.loadMessagesIfMissing(["global-navigation-search-placeholder-inactive", "global-navigation-search-placeholder-in-wiki", "recentchanges","mediastatistics-header-video", "images"]); }).then(function{	//prevent double loading	if( $(document.body).hasClass("oasis-is-revived") ) {		return;	}

var oasisRevivedClass = $(document.body).addClass("oasis-is-revived");

//Search bar in global nav var search_container = $(" ", {		class: "global-navigation__search-container",		action: mw.config.get("wgScriptPath") + "/wiki/Special:Search",	});

$(".global-navigation__search").remove; $(".global-navigation__bottom").append(search_container);

var search_mainDiv = $(" ").addClass("global-navigation__search"); var search_toggle = $(" ").addClass("global-navigation__search-toggle"); var search_toggleIconSmall = $(' '); var search_toggleIcon = $(' '); var search_toggleText = $(" ", {		class: "global-navigation__search-toggle-text",		text: mw.msg("global-navigation-search-placeholder-inactive"),	}); var search_inputWrapper = $(" ").addClass("global-navigation__search-input-wrapper"); var search_boxDiv = $(" ") .addClass("wds-dropdown") .addClass("global-navigation__suggestions-anchor") .addClass("wds-no-chevron"); var search_box = $(" ", {		type: "search",		class: "global-navigation__search-input",		name: "query",		autocomplete: "off",		"data-suggestions-param-name": "query",		"data-suggestions-tracking-label": "search-suggestion",		placeholder: mw.msg("global-navigation-search-placeholder-in-wiki").replace("$1", mw.config.get("wgSiteName") ),	}); var search_boxHidden = $(" ", {		type: "hidden",		name: "navigationSearch",		value: "true",	}); $(search_container).append(search_mainDiv); $(search_mainDiv).append(search_toggle, search_inputWrapper); $(search_toggle).append(search_toggleIconSmall, search_toggleIcon, search_toggleText); $(search_inputWrapper).append(search_boxDiv); $(search_boxDiv).append(search_box, search_boxHidden); });