User:Writ Keeper/Scripts/SearchNamespaceMono.js

In today's world, User:Writ Keeper/Scripts/SearchNamespaceMono.js has become a topic of increasing interest to people of all ages and backgrounds. Whether we are talking about the importance of mental health, the technological revolution, women's empowerment, or any other topic, User:Writ Keeper/Scripts/SearchNamespaceMono.js is a fundamental element that has gained relevance in all spheres of life. From its impact on politics and the economy, to its influence on popular culture, User:Writ Keeper/Scripts/SearchNamespaceMono.js is an aspect that we cannot ignore. In this article, we will explore how User:Writ Keeper/Scripts/SearchNamespaceMono.js has transformed the way we think and act, and how its presence continues to shape our world in ways that were previously unimaginable.
function NSSearch()
{
	var prefixList = document.createElement("select");
	prefixList.id = "searchNSSelect";
	prefixList.innerHTML = "<option >Article:</option>\n <option>Article talk:</option>\n <option>Wikipedia:</option>\n <option>Wikipedia talk:</option>\n <option>User:</option>\n <option>User talk:</option>\n<option>WikiProject:</option>\n <option>WikiProject talk:</option>\n<option>Category:</option>\n <option>Category talk:</option>\n<option>Template:</option>\n <option>Template talk:</option>\n <option>Book:</option>\n <option>Book talk:</option>\n <option>Help:</option>\n <option>Special:</option>";
	
	var hiddenInput = document.createElement("input");
	hiddenInput.type = "hidden";
	hiddenInput.name = "search";
	hiddenInput.id = "hiddenNSInput";
	
	var searchInput = $("#searchInput");
	searchInput.before(hiddenInput);
	searchInput.before(prefixList);
	searchInput.removeAttr("name");
	
    prefixList.tabIndex = searchInput.tabIndex;
	
	$("#searchform").submit(function()
	{
		var prefixValue = $("#searchNSSelect").prop("value");
		switch(prefixValue)
		{
			case "Article:":
				$("#hiddenNSInput").prop("value", $("#searchInput").prop("value"));
				break;
			case "Article talk:":
				$("#hiddenNSInput").prop("value", "Talk:" + $("#searchInput").prop("value"));
				break;
			case "WikiProject:":
				$("#hiddenNSInput").prop("value", "Wikipedia:WikiProject " + $("#searchInput").prop("value"));
				break;
			case "WikiProject talk:":
				$("#hiddenNSInput").prop("value", "Wikipedia talk:WikiProject " + $("#searchInput").prop("value"));
				break;
			default:
				$("#hiddenNSInput").prop("value", prefixValue + $("#searchInput").prop("value"));
				break;
		}
	});
}
$(document).ready(NSSearch);