Community Central
Community Central
No edit summary
Tag: sourceedit
No edit summary
Tag: sourceedit
Line 9: Line 9:
 
}
 
}
 
});
 
});
  +
  +
/* 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 = "RTE";
  +
pedroVE.parentNode.parentNode.insertBefore(pedroRTE.parentNode,pedroVE.parentNode);

Revision as of 00:27, 10 June 2016

/* Fix crappy search */
document.getElementById("searchForm").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 = "RTE";
pedroVE.parentNode.parentNode.insertBefore(pedroRTE.parentNode,pedroVE.parentNode);