diff --git a/README.md b/README.md index 067a422..e414055 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # BingoGenerator Website -Found at [bingo.jonasjones.dev](https://bingo.jonasjones.dev/) and [bingogenerator.jonasjones.dev](https://bingogenerator.jonasjones.dev/) +Found at https://bingogenerator.jonasjones.dev/ diff --git a/package-lock.json b/package-lock.json index 877c03b..24f1e29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,15 @@ { - "name": "bingo.jonasjones.dev", + "name": "jonasjones.me", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "bingo.jonasjones.dev", + "name": "jonasjones.me", "version": "0.0.1", "dependencies": { "html2canvas": "^1.4.1", - "jspdf": "^2.5.2", - "party-js": "^2.2.0" + "jspdf": "^2.5.2" }, "devDependencies": { "@sveltejs/adapter-auto": "^2.0.0", @@ -23,9 +22,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz", - "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -35,9 +34,9 @@ } }, "node_modules/@cloudflare/workers-types": { - "version": "4.20250321.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20250321.0.tgz", - "integrity": "sha512-jPwtZJC7tVFOwFazuwq96be8haTnY9qik8hJ+oLFi50d9LTWPPrnrNHC4OxZmJTEcPIAy0y1WFZHe8C/b7xFXQ==", + "version": "4.20241106.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20241106.0.tgz", + "integrity": "sha512-pI4ivacmp+vgNO/siHDsZ6BdITR0LC4Mh/1+yzVLcl9U75pt5DUDCOWOiqIRFXRq6H65DPnJbEPFo3x9UfgofQ==", "dev": true, "license": "MIT OR Apache-2.0" }, @@ -685,9 +684,9 @@ } }, "node_modules/canvg": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.11.tgz", - "integrity": "sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz", + "integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==", "license": "MIT", "optional": true, "dependencies": { @@ -754,9 +753,9 @@ } }, "node_modules/core-js": { - "version": "3.41.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.41.0.tgz", - "integrity": "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==", + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", + "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", "hasInstallScript": true, "license": "MIT", "optional": true, @@ -775,9 +774,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "license": "MIT", "dependencies": { @@ -820,9 +819,9 @@ "license": "MIT" }, "node_modules/dompurify": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.8.tgz", - "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.7.tgz", + "integrity": "sha512-2q4bEI+coQM8f5ez7kt2xclg1XsecaV9ASJk/54vwlfRRNQfDqJz2pzQ8t0Ix/ToBpXlVjrRIx7pFC/o8itG2Q==", "license": "(MPL-2.0 OR Apache-2.0)", "optional": true }, @@ -872,9 +871,9 @@ } }, "node_modules/esm-env": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", - "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.1.4.tgz", + "integrity": "sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==", "dev": true, "license": "MIT" }, @@ -1093,9 +1092,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, "license": "MIT", "dependencies": { @@ -1176,9 +1175,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -1214,12 +1213,6 @@ "wrappy": "1" } }, - "node_modules/party-js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/party-js/-/party-js-2.2.0.tgz", - "integrity": "sha512-50hGuALCpvDTrQLPQ1fgUgxKIWAH28ShVkmeK/3zhO0YJyCqkhrZhQEkWPxDYLvbFJ7YAXyROmFEu35gKpZLtQ==", - "license": "MIT" - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1258,9 +1251,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -1278,8 +1271,8 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", "source-map-js": "^1.2.1" }, "engines": { @@ -1415,9 +1408,9 @@ } }, "node_modules/sirv/node_modules/mrmime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", - "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, "license": "MIT", "engines": { @@ -1634,9 +1627,9 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", - "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1648,9 +1641,9 @@ } }, "node_modules/undici": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "license": "MIT", "dependencies": { @@ -1670,9 +1663,9 @@ } }, "node_modules/vite": { - "version": "4.5.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.10.tgz", - "integrity": "sha512-f2ueoukYTMI/5kMMT7wW+ol3zL6z6PjN28zYrGKAjnbzXhRXWXPThD3uN6muCp+TbfXaDgGvRuPsg6mwVLaWwQ==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", + "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index b027537..6153a9e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "bingo.jonasjones.dev", + "name": "jonasjones.me", "version": "0.0.1", "private": true, "scripts": { @@ -21,7 +21,6 @@ "type": "module", "dependencies": { "html2canvas": "^1.4.1", - "jspdf": "^2.5.2", - "party-js": "^2.2.0" + "jspdf": "^2.5.2" } } diff --git a/src/app.html b/src/app.html index de72b10..7264648 100644 --- a/src/app.html +++ b/src/app.html @@ -6,8 +6,6 @@ - - %sveltekit.head% diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte deleted file mode 100644 index 7e71c19..0000000 --- a/src/lib/components/Footer.svelte +++ /dev/null @@ -1,90 +0,0 @@ -
- - - - \ No newline at end of file diff --git a/src/lib/cookies.js b/src/lib/cookies.js deleted file mode 100644 index f02b5f5..0000000 --- a/src/lib/cookies.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Functions to add the gameLock cookie - * @module cookies - */ -export function addGameLockCookie() { - document.cookie = `gameLock=;path=/;max-age=31536000`; // Cookie lasts for 1 year -} - -/** - * Function to check if the gameLock cookie is present - * @returns {boolean} True if the gameLock cookie is present, false otherwise - */ -export function isGameLockCookiePresent() { - return document.cookie.split('; ').some(cookie => cookie.startsWith('gameLock=')); -} - -/** - * Function to delete the gameLock cookie - */ -export function deleteGameLockCookie() { - document.cookie = `gameLock=;path=/;max-age=0`; -} - - -/** - * @param {String} entries - * @param {String} cookieName - */ -export function saveEntriesAsCookie(entries, cookieName = 'bingoEntries') { - document.cookie = `${cookieName}=${encodeURIComponent(entries)};path=/;max-age=31536000`; // Cookie lasts for 1 year -} - -/** - * Function to retrieve the entries from - * the cookie - * @param {String} cookieName - * @returns {String} The entries from the cookie - */ -export function getEntriesFromCookie(cookieName = 'bingoEntries') { - const cookies = document.cookie.split('; '); - for (let cookie of cookies) { - const [name, value] = cookie.split('='); - if (name === cookieName) { - return decodeURIComponent(value); - } - } - return ""; // if the cookie is not found -} - -/** - * Function to delete the entries cookie - * @param {String} cookieName - */ -export function deleteSavedEntriesCookie(cookieName = 'bingoEntries') { - document.cookie = `${cookieName}=;path=/;max-age=0`; -} - -/** - * @param {ArrayEnter your items below and click the button to generate a random 5x5 bingo grid.
+ +NOTE: If there are more lines than Bingo cells, not all Items will be in the Bingo. The selection is still randomized.
+ + + + {#if running_bingo && tried_to_regen} +You are currently playing this game of Bingo and it therefore doesn't Refresh changes or Regenerate the table. If you would like to End the Game, Click the Button below.
+You are currently playing this game of Bingo and it therefore doesn't Refresh changes or Regenerate the table. If you would like to End the Game, Click the Button below.
- + {/if} + {#if running_bingo && !tried_to_regen} + A game is currently running. Changes made to the configuration are not being updated to the grid. + {/if} + + {#if grid.length > 0} +Click the Button to generate a new Bingo
- -Notice: This Website uses functional Cookies to store the Running Bingo Game as well as the Entered Bingo Entries.