function Load(){ imageLoad(); create_colors(); } function imageLoad(){ // var link = getUrlVars()["link"]; var link = "./nier.jpg" var body = document.getElementById('image'); var image = document.createElement('img'); image.setAttribute("class", "image"); image.src = link; body.appendChild(image); } function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; } function show_XRF(){ var x = document.getElementById("XRFcolors"); var y = document.getElementById("FORScolors"); if (x.style.display === "none") { x.style.display = "block"; y.style.display = "none"; } else { x.style.display = "none"; } } function show_FORS(){ var x = document.getElementById("FORScolors"); var y = document.getElementById("XRFcolors"); if (x.style.display === "none") { x.style.display = "block"; y.style.display = "none"; } else { x.style.display = "none"; } } function openNav() { document.getElementById("sidebar").style.width = "200px"; } function closeNav() { document.getElementById("sidebar").style.width = "0"; } function buttons_colors(){ // var buttons = document.getElementById('XRFcolors'); // var newNode = document.createElement('button'); // newNode.setAttribute("class", "colors"); // newNode.appendChild(document.createTextNode(line)); // buttons.appendChild(newNode); // var buttons = document.getElementById('FORScolors'); // var newNode = document.createElement('button'); // newNode.setAttribute("class", "colors"); // newNode.appendChild(document.createTextNode(line)); // buttons.appendChild(newNode); console.log("hi") }