Contains the Concourse pipeline definition for building a line-server container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.7 KiB

  1. // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
  2. var navlist = document.getElementById("info").getElementsByClassName("right")[0];
  3. init();
  4. function init() {
  5. var editA = document.createElement('a');
  6. editA.setAttribute("href", "#");
  7. editA.addEventListener('click', function(ev) {
  8. edit(ev);
  9. return false;
  10. });
  11. editA.innerHTML = "edit";
  12. var separator = document.createTextNode(" | ");
  13. navlist.insertBefore(editA, navlist.firstChild);
  14. navlist.insertBefore(separator, navlist.children[1]);
  15. document.getElementById('save').addEventListener('click', paste);
  16. document.getElementById('wordwrap').addEventListener('click', wrap);
  17. }
  18. function edit(ev) {
  19. navlist.remove();
  20. document.getElementById("filename").remove();
  21. document.getElementById("editform").style.display = "block";
  22. var normalcontent = document.getElementById("normal-content");
  23. normalcontent.removeChild(document.getElementById("normal-code"));
  24. var editordiv = document.getElementById("editor");
  25. editordiv.style.display = "block";
  26. }
  27. function paste(ev) {
  28. var editordiv = document.getElementById("editor");
  29. document.getElementById("newcontent").value = editordiv.value;
  30. document.forms["reply"].submit();
  31. }
  32. function wrap(ev) {
  33. if (document.getElementById("wordwrap").checked) {
  34. document.getElementById("codeb").style.wordWrap = "break-word";
  35. document.getElementById("codeb").style.whiteSpace = "pre-wrap";
  36. }
  37. else {
  38. document.getElementById("codeb").style.wordWrap = "normal";
  39. document.getElementById("codeb").style.whiteSpace = "pre";
  40. }
  41. }
  42. // @license-end