diff --git a/gctGenerator.js b/gctGenerator.js index 5456a11..67fdd86 100644 --- a/gctGenerator.js +++ b/gctGenerator.js @@ -12,6 +12,29 @@ document.getElementById("checkList").addEventListener("click", function(ev) { } }); +window.addEventListener("scroll", function(e) { + try { + document.getElementById("descriptionBox").style.left = (470 - window.pageXOffset) + "px"; + if (document.getElementById("warningMessage").style.display != "none") { + if(window.pageYOffset > 120) { + document.getElementById("descriptionBox").style.top = "0px"; + } else { + document.getElementById("descriptionBox").style.top = (120 - window.pageYOffset) + "px"; + } + } else { + if(window.pageYOffset > 61) { + document.getElementById("descriptionBox").style.top = "0px"; + } else { + document.getElementById("descriptionBox").style.top = (61 - window.pageYOffset - 11) + "px"; + } + } + + } catch (ex) { + console.log("error"); + } +}); + + function parseXML(name) { var xml = new XMLHttpRequest(); var file = "codes/" + name + ".xml"; diff --git a/index.html b/index.html index ee78377..5cf1f9d 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@