User:Sir Lewk/monobook.js

//Wikipedia PopUps // User:Lupin/popups.js

document.write(' ');

//Search in Namespace

$(function {    var searchGoButton = document.getElementById('searchGoButton');    if (!searchGoButton) return;

var searchNsHidden = document.createElement('input'); searchNsHidden.id = 'searchNsHidden'; searchNsHidden.type = 'hidden'; searchNsHidden.name = 'ns0'; searchNsHidden.value = '1';

var searchNsMenu = document.createElement('select'); searchNsMenu.id = 'searchNsMenu'; searchNsMenu.name = 'ns'; searchNsMenu.innerHTML = ' (Main) \n' + ' Talk \n' + ' User \n' + ' User talk \n' + ' Wikipedia \n' + ' Wikipedia talk \n' + ' Image \n' + ' Image talk \n' + ' MediaWiki \n' + ' MediaWiki talk \n' + ' Template \n' + ' Template talk \n' + ' Help \n' + ' Help talk \n' + ' Category \n' + ' Category talk \n' + ' Portal \n' + ' Portal talk \n' ; searchNsMenu.onchange = function { searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' : this.options[this.selectedIndex].value); };

// From /skins-1.5/monobook/main.css?5: searchNsMenu.style.width = '10.9em'; searchNsMenu.style.margin = '0'; searchNsMenu.style.fontSize = '95%';

searchGoButton.parentNode.insertBefore(searchNsHidden, searchGoButton); searchGoButton.parentNode.insertBefore(searchNsMenu, searchGoButton); });