User:PedroM/global.js

/* Fix crappy search */ var searchForm = document.getElementById("searchForm"); var searchInput = document.getElementById("searchInput"); searchForm.addEventListener ("submit", function(event) { "use strict";  if (searchInput.value.indexOf(":") != -1) {    event.preventDefault;    //event.stopPropagation;    window.location = '/wiki/' + encodeURI(searchInput.value);  } });