diff options
Diffstat (limited to 'resources/js')
-rw-r--r-- | resources/js/app.js | 1 | ||||
-rw-r--r-- | resources/js/bootstrap.js | 32 | ||||
-rw-r--r-- | resources/js/neverSaid.js | 35 | ||||
-rw-r--r-- | resources/js/schemeSwap.js | 70 |
4 files changed, 0 insertions, 138 deletions
diff --git a/resources/js/app.js b/resources/js/app.js deleted file mode 100644 index e59d6a0..0000000 --- a/resources/js/app.js +++ /dev/null @@ -1 +0,0 @@ -import './bootstrap'; diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js deleted file mode 100644 index 846d350..0000000 --- a/resources/js/bootstrap.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back-end. This library automatically handles sending the - * CSRF token as a header based on the value of the "XSRF" token cookie. - */ - -import axios from 'axios'; -window.axios = axios; - -window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; - -/** - * Echo exposes an expressive API for subscribing to channels and listening - * for events that are broadcast by Laravel. Echo and event broadcasting - * allows your team to easily build robust real-time web applications. - */ - -// import Echo from 'laravel-echo'; - -// import Pusher from 'pusher-js'; -// window.Pusher = Pusher; - -// window.Echo = new Echo({ -// broadcaster: 'pusher', -// key: import.meta.env.VITE_PUSHER_APP_KEY, -// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', -// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, -// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, -// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, -// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', -// enabledTransports: ['ws', 'wss'], -// }); diff --git a/resources/js/neverSaid.js b/resources/js/neverSaid.js deleted file mode 100644 index 5b58d60..0000000 --- a/resources/js/neverSaid.js +++ /dev/null @@ -1,35 +0,0 @@ -// Define an array of strings -const neverSaid = [ - "<td style=\"width: 105px\"><strong>ASM:</strong></td> <td>The Director liked all the props we got today.</td>", - "<td style=\"width: 105px\"><strong>PM:</strong></td> <td>Ah ha, a revolve. Terrific.</td>", - "<td style=\"width: 105px\"><strong>Chippie:</strong></td> <td>I don't know, let's look at the ground plan.</td>", - "<td style=\"width: 105px\"><strong>Set Designer:</strong></td> <td>Well, let's just have whatever is cheaper.</td>", - "<td style=\"width: 105px\"><strong>Sound:</strong></td> <td>Better turn that down a bit. We don't want to deafen them.</td>", - "<td style=\"width: 105px\"><strong>Director:</strong></td> <td>Sorry, my mistake.</td>", - "<td style=\"width: 105px\"><strong>Electrics:</strong></td> <td>This equipment is more complicated than we need.</td>", - "<td style=\"width: 105px\"><strong>Performer:</strong></td> <td>I really think my big scene should be cut.</td>", - "<td style=\"width: 105px\"><strong>SM:</strong></td> <td>Can we doo that scene change again please?", - "<td style=\"width: 105px\"><strong>LX designer:</strong></td> <td>Bit more light from those big chaps at the side. Yes that's right, the ones on stalks whatever they are called.</td>", - "<td style=\"width: 105px\"><strong>Electrics:</strong></td> <td>All the equipment works perfectly.</td>", - "<td style=\"width: 105px\"><strong>Musicians:</strong></td> <td>So what if that's the end of a call. Let's just finish this bit off.</td>", - "<td style=\"width: 105px\"><strong>Wardrobe:</strong></td> <td>Now, when exactly is the first dress rehearsal?", - "<td style=\"width: 105px\"><strong>Workshop:</strong></td> <td>I don't want anyone to know, but if you insist then yes, I admit it, I have just done an all-nighter.</td>", - "<td style=\"width: 105px\"><strong>Performer:</strong></td> <td>This costume is so comfortable.</td>", - "<td style=\"width: 105px\"><strong>Admin:</strong></td> <td>The level of overtime payments here are simply unacceptable. Our backstage staff deserve better.</td>", - "<td style=\"width: 105px\"><strong>Box Office:</strong></td> <td>Comps? No problem.</td>", - "<td style=\"width: 105px\"><strong>Set Designer:</strong></td> <td>You're right, it looks dreadful.</td>", - "<td style=\"width: 105px\"><strong>Flyman:</strong></td> <td>No, my lips are sealed. What I may or may not have seen remains a secret.</td>", - "<td style=\"width: 105px\"><strong>Electrics:</strong></td> <td>That had nothing to do with the computer, it was my fault.</td>", - "<td style=\"width: 105px\"><strong>Crew:</strong></td> <td>No, no, I'm sure that's our job.</td>", - "<td style=\"width: 105px\"><strong>SMgt:</strong></td> <td>Thanks, but I don't drink", - "<td style=\"width: 105px\"><strong>Performer:</strong></td> <td>Let me stand down here with my back to the audience.</td>", - "<td style=\"width: 105px\"><strong>Chippie:</strong></td> <td>I can't really manage those big fast power tools myself.</td>", - "<td style=\"width: 105px\"><strong>Chippie:</strong></td> <td>I prefer to use these little hand drills.</td>", - "<td style=\"width: 105px\"><strong>All:</strong></td> <td>Let's go and ask the Production Manager. He'll know.</td>" -] - -// Generate a random index into the array -const randomIndex = Math.floor(Math.random() * neverSaid.length); - -// Use document.write to output the random string -document.write(neverSaid[randomIndex]); diff --git a/resources/js/schemeSwap.js b/resources/js/schemeSwap.js deleted file mode 100644 index 3baa09b..0000000 --- a/resources/js/schemeSwap.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Retrieves a cookies value - * @param {string} cname Cookie name - * @returns {string} Cookie value - */ -function getCookie(cname) { - let name = cname + "="; - let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(';'); - for(let i = 0; i <ca.length; i++) { - let c = ca[i]; - while (c.charAt(0) === ' ') { - c = c.substring(1); - } - if (c.indexOf(name) === 0) { - return c.substring(name.length, c.length); - } - } - return ""; -} - -/** - * Sets/creates a cookie - * @param {string} cname Cookie name - * @param {string} cvalue Cookie value - * @param {number} exdays Cookie lifespan (days) - */ -function setCookie(cname, cvalue, exdays) { - const d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); - let expires = "expires="+ d.toUTCString(); - document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/;SameSite=Strict;Domain=.diskfloppy.me"; -} - -/** - * Checks if a cookie exists - * @param {string} cname Cookie name - * @returns {boolean} If cookie exists or not - */ -function cookieExists(cname) { - const cvalue = getCookie(cname); - return cvalue !== ""; -} - -/** - * Swaps the colorscheme - * @param {string} scheme Color scheme ID - */ -function swapScheme(scheme) { - setCookie("colorscheme", scheme, 90); - document.getElementById("css-colorscheme").href = `/css/colorschemes/${scheme}.css`; - console.log(`Set colorscheme to ${getCookie("colorscheme")}`) -} - -function setSchemeSelector() { - if (!cookieExists("colorscheme")) { - setCookie("colorscheme", "catppuccin-macchiato", 90); - } else { - const scheme = getCookie("colorscheme"); - const scheme_selector = document.getElementById("scheme-selector"); - if (scheme && scheme_selector) { - for (let option of scheme_selector.options) { - if (option.value === scheme) { - option.selected = true; - break; - } - } - } - } -} |