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.

51 lines
1.4 KiB

  1. var navlist = document.getElementById("info").getElementsByClassName("right")[0];
  2. init();
  3. function init() {
  4. var editA = document.createElement('a');
  5. editA.setAttribute("href", "#");
  6. editA.setAttribute("onclick", "edit();return false;");
  7. editA.innerHTML = "edit";
  8. var separator = document.createTextNode(" | ");
  9. navlist.insertBefore(editA, navlist.firstChild);
  10. navlist.insertBefore(separator, navlist.children[1]);
  11. }
  12. function edit() {
  13. navlist.remove();
  14. document.getElementById("filename").remove();
  15. document.getElementById("foarm").style.display = "block";
  16. var normalcontent = document.getElementById("normal-content");
  17. normalcontent.removeChild(document.getElementById("normal-code"));
  18. var editordiv = document.getElementById("editor");
  19. editordiv.style.display = "block";
  20. }
  21. function paste() {
  22. var editordiv = document.getElementById("editor");
  23. document.getElementById("newcontent").value = editordiv.value;
  24. document.forms["reply"].submit();
  25. }
  26. function wrap() {
  27. if (document.getElementById("wordwrap").checked) {
  28. document.getElementById("codeb").style.wordWrap = "break-word";
  29. document.getElementById("codeb").style.whiteSpace = "pre-wrap";
  30. }
  31. else {
  32. document.getElementById("codeb").style.wordWrap = "normal";
  33. document.getElementById("codeb").style.whiteSpace = "pre";
  34. }
  35. }