User:PedroM/global.js

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

/* RTEdit */ var pedroVE = document.getElementById("ca-ve-edit"); var pedroRTE = document.createElement("a"); document.createElement("li").appendChild(pedroRTE); pedroRTE.href = pedroVE.href.replace('veaction=edit', "action=edit&useeditor=wysiwyg"); pedroRTE.innerHTML = "RichTextEditor"; pedroVE.parentNode.parentNode.insertBefore(pedroRTE.parentNode,pedroVE.parentNode);