Restyled by clang-format
This commit is contained in:
parent
3787b539f8
commit
23dff498c8
3 changed files with 97 additions and 93 deletions
|
@ -1,35 +1,36 @@
|
|||
// Define an array of strings
|
||||
const neverSaid = [
|
||||
"<strong>ASM:</strong> The Director liked all the props we got today.",
|
||||
"<strong>PM:</strong> Ah ha, a revolve. Terrific.",
|
||||
"<strong>Chippie:</strong> I don't know, let's look at the ground plan.",
|
||||
"<strong>Set Designer:</strong> Well, let's just have whatever is cheaper.",
|
||||
"<strong>Sound:</strong> Better turn that down a bit. We don't want to deafen them.",
|
||||
"<strong>Director:</strong> Sorry, my mistake.",
|
||||
"<strong>Electrics:</strong> This equipment is more complicated than we need.",
|
||||
"<strong>Performer:</strong> I really think my big scene should be cut.",
|
||||
"<strong>SM:</strong> Can we do that scene change again please?",
|
||||
"<strong>LX designer:</strong> Bit more light from those big chaps at the side. Yes that's right, the ones on stalks whatever they are called.",
|
||||
"<strong>Electrics:</strong> All the equipment works perfectly.",
|
||||
"<strong>Musicians:</strong> So what if that's the end of a call. Let's just finish this bit off.",
|
||||
"<strong>Wardrobe:</strong> Now, when exactly is the first dress rehearsal?",
|
||||
"<strong>Workshop:</strong> I don't want anyone to know, but if you insist then yes, I admit it, I have just done an all-nighter.",
|
||||
"<strong>Performer:</strong> This costume is so comfortable.",
|
||||
"<strong>Admin:</strong> The level of overtime payments here are simply unacceptable. Our backstage staff deserve better.",
|
||||
"<strong>Box Office:</strong> Comps? No problem.",
|
||||
"<strong>Set Designer:</strong> You're right, it looks dreadful.",
|
||||
"<strong>Flyman:</strong> No, my lips are sealed. What I may or may not have seen remains a secret.",
|
||||
"<strong>Electrics:</strong> That had nothing to do with the computer, it was my fault.",
|
||||
"<strong>Crew:</strong> No, no, I'm sure that's our job.",
|
||||
"<strong>SMgt:</strong> Thanks, but I don't drink",
|
||||
"<strong>Performer:</strong> Let me stand down here with my back to the audience.",
|
||||
"<strong>Chippie:</strong> I can't really manage those big fast power tools myself.",
|
||||
"<strong>Chippie:</strong> I prefer to use these little hand drills.",
|
||||
"<strong>All:</strong> Let's go and ask the Production Manager. He'll know."
|
||||
]
|
||||
const neverSaid =
|
||||
[
|
||||
"<strong>ASM:</strong> The Director liked all the props we got today.",
|
||||
"<strong>PM:</strong> Ah ha, a revolve. Terrific.",
|
||||
"<strong>Chippie:</strong> I don't know, let's look at the ground plan.",
|
||||
"<strong>Set Designer:</strong> Well, let's just have whatever is cheaper.",
|
||||
"<strong>Sound:</strong> Better turn that down a bit. We don't want to deafen them.",
|
||||
"<strong>Director:</strong> Sorry, my mistake.",
|
||||
"<strong>Electrics:</strong> This equipment is more complicated than we need.",
|
||||
"<strong>Performer:</strong> I really think my big scene should be cut.",
|
||||
"<strong>SM:</strong> Can we do that scene change again please?",
|
||||
"<strong>LX designer:</strong> Bit more light from those big chaps at the side. Yes that's right, the ones on stalks whatever they are called.",
|
||||
"<strong>Electrics:</strong> All the equipment works perfectly.",
|
||||
"<strong>Musicians:</strong> So what if that's the end of a call. Let's just finish this bit off.",
|
||||
"<strong>Wardrobe:</strong> Now, when exactly is the first dress rehearsal?",
|
||||
"<strong>Workshop:</strong> I don't want anyone to know, but if you insist then yes, I admit it, I have just done an all-nighter.",
|
||||
"<strong>Performer:</strong> This costume is so comfortable.",
|
||||
"<strong>Admin:</strong> The level of overtime payments here are simply unacceptable. Our backstage staff deserve better.",
|
||||
"<strong>Box Office:</strong> Comps? No problem.",
|
||||
"<strong>Set Designer:</strong> You're right, it looks dreadful.",
|
||||
"<strong>Flyman:</strong> No, my lips are sealed. What I may or may not have seen remains a secret.",
|
||||
"<strong>Electrics:</strong> That had nothing to do with the computer, it was my fault.",
|
||||
"<strong>Crew:</strong> No, no, I'm sure that's our job.",
|
||||
"<strong>SMgt:</strong> Thanks, but I don't drink",
|
||||
"<strong>Performer:</strong> Let me stand down here with my back to the audience.",
|
||||
"<strong>Chippie:</strong> I can't really manage those big fast power tools myself.",
|
||||
"<strong>Chippie:</strong> I prefer to use these little hand drills.",
|
||||
"<strong>All:</strong> Let's go and ask the Production Manager. He'll know."
|
||||
]
|
||||
|
||||
// Generate a random index into the array
|
||||
const randomIndex = Math.floor(Math.random() * neverSaid.length);
|
||||
// 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]);
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
// 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>"
|
||||
]
|
||||
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);
|
||||
// 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]);
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
* @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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
return "";
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,10 +26,11 @@ function getCookie(cname) {
|
|||
* @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";
|
||||
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";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,8 +39,8 @@ function setCookie(cname, cvalue, exdays) {
|
|||
* @returns {boolean} If cookie exists or not
|
||||
*/
|
||||
function cookieExists(cname) {
|
||||
const cvalue = getCookie(cname);
|
||||
return cvalue !== "";
|
||||
const cvalue = getCookie(cname);
|
||||
return cvalue !== "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,24 +48,25 @@ function cookieExists(cname) {
|
|||
* @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")}`)
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue