summaryrefslogtreecommitdiff
path: root/src/assets/main.js
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2021-07-31 11:35:39 -0600
committerBrian Picciano <mediocregopher@gmail.com>2021-07-31 11:35:39 -0600
commitf1998c321a4eec6d75b58d84aa8610971bf21979 (patch)
treea90783eb296cc50e1c48433f241624f26b99be27 /src/assets/main.js
parent03a35dcc38b055f15df160bd300969e3b703d4b1 (diff)
move static files into static sub-dir, refactor nix a bit
Diffstat (limited to 'src/assets/main.js')
-rw-r--r--src/assets/main.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/assets/main.js b/src/assets/main.js
deleted file mode 100644
index 7557f2b..0000000
--- a/src/assets/main.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// showModal will create the modal structure the first time it is called.
-var modal, modalContent;
-const showModal = function() {
- if (!modal) {
- // make the modal
- const modalClose = document.createElement('span');
- modalClose.id = 'modal-close';
- modalClose.innerHTML = '&times;';
-
- modalContent = document.createElement('div');
- modalContent.id = 'modal-content';
-
- const modalBody = document.createElement('div');
- modalBody.id = 'modal-body';
- modalBody.appendChild(modalContent);
- modalBody.appendChild(modalClose);
-
- modal = document.createElement('div');
- modal.id = 'modal';
- modal.appendChild(modalBody);
-
- // add the modal to the document
- document.getElementsByTagName('body')[0].appendChild(modal);
-
- // setup modal functionality
- modalClose.onclick = function() {
- modal.style.display = "none";
- }
- }
-
- modalContent.innerHTML = '';
- for (var i = 0; i < arguments.length; i++) {
- modalContent.appendChild(arguments[i]);
- }
- modal.style.display = "block";
-
- // When the user clicks anywhere outside of the modal, close it
- window.onclick = function(event) {
- if (event.target == modal) {
- modal.style.display = "none";
- window.onclick = undefined;
- }
- }
-}
-
-document.addEventListener("DOMContentLoaded", () => {
- console.log("DOM loaded");
-})