Няма описание

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. function Load(){
  2. imageLoad();
  3. create_colors();
  4. }
  5. function imageLoad(){
  6. // var link = getUrlVars()["link"];
  7. var link = "./nier.jpg"
  8. var body = document.getElementById('image');
  9. var image = document.createElement('img');
  10. image.setAttribute("class", "image");
  11. image.src = link;
  12. body.appendChild(image);
  13. }
  14. function getUrlVars() {
  15. var vars = {};
  16. var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
  17. vars[key] = value;
  18. });
  19. return vars;
  20. }
  21. function show_XRF(){
  22. var x = document.getElementById("XRFcolors");
  23. var y = document.getElementById("FORScolors");
  24. if (x.style.display === "none") {
  25. x.style.display = "block";
  26. y.style.display = "none";
  27. } else {
  28. x.style.display = "none";
  29. }
  30. }
  31. function show_FORS(){
  32. var x = document.getElementById("FORScolors");
  33. var y = document.getElementById("XRFcolors");
  34. if (x.style.display === "none") {
  35. x.style.display = "block";
  36. y.style.display = "none";
  37. } else {
  38. x.style.display = "none";
  39. }
  40. }
  41. function openNav() {
  42. document.getElementById("sidebar").style.width = "200px";
  43. }
  44. function closeNav() {
  45. document.getElementById("sidebar").style.width = "0";
  46. }
  47. function buttons_colors(){
  48. // var buttons = document.getElementById('XRFcolors');
  49. // var newNode = document.createElement('button');
  50. // newNode.setAttribute("class", "colors");
  51. // newNode.appendChild(document.createTextNode(line));
  52. // buttons.appendChild(newNode);
  53. // var buttons = document.getElementById('FORScolors');
  54. // var newNode = document.createElement('button');
  55. // newNode.setAttribute("class", "colors");
  56. // newNode.appendChild(document.createTextNode(line));
  57. // buttons.appendChild(newNode);
  58. console.log("hi")
  59. }