User:EpochFail/test button.js

searchGoButton = document.getElementById('searchGoButton') searchGoButton.style.display = "none"

searchButton = document.getElementById('mw-searchButton') newButton = document.createElement('button') newButton.value = "New" newButton.name = "New" newButton.innerHTML = "New" newButton.className = "searchButton" newButton.onclick = function{ alert("New search button clicked") }

searchButton.parentNode.appendChild(newButton)