diff --git a/hidepage.js b/hidepage.js deleted file mode 100644 index 29bea70..0000000 --- a/hidepage.js +++ /dev/null @@ -1,39 +0,0 @@ -function hide_page() { - // to unhide the hidden element, we also need to un-ID it - // to make the CSS rule stop applying - // janky hack, but it makes it not have 1 frame of showing on load. - hidden.id = ''; - hidden.style.display = ''; - shown.style.display = 'none'; -} - -function unhide_page() { - shown.style.display = ''; - hidden.style.display = 'none'; -} - -function hide_actually_everything() { - hidden.style.display = 'none'; -} - -// get the elements we need to hide -var shown = document.getElementById("page-content"); -var hidden = document.getElementById("page-content-hidden"); - -// assign functions to buttons -document - .getElementById("button-hide-page") - .addEventListener("click", hide_page); -document - .getElementById("button-unhide-page") - .addEventListener("click", unhide_page); -document - .getElementById("button-hide-everything") - .addEventListener("click", hide_actually_everything); - -// check URL params and see if we should hideall -const urlParams = new URLSearchParams(window.location.search); -if (urlParams.has('hideall')) { - hide_page(); - hide_actually_everything(); -} diff --git a/index.html b/index.html index 3eb43ca..67b544c 100644 --- a/index.html +++ b/index.html @@ -2,39 +2,23 @@
-code started out from Jack McKew's blogpost, but very few parts of that original is left
+ move the mouse to gaming -click to hide all page contents:
- -