Skip to content

Commit

Permalink
added third shoutout
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-adriansens authored Jan 19, 2024
1 parent 35a8a4e commit 77ef9da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Binary file added src/assets/shoutout_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions src/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ const speedIcons = [
"M23.9,11.437A12,12,0,0,0,4,4.052a12.055,12.055,0,0,0-.246,17.66A4.847,4.847,0,0,0,7.114,23H16.88a4.988,4.988,0,0,0,3.508-1.429A11.942,11.942,0,0,0,23.9,11.437ZM18.99,20.142A3.005,3.005,0,0,1,16.88,21H7.114a2.863,2.863,0,0,1-1.982-.741A10.045,10.045,0,0,1,5.337,5.543a10,10,0,0,1,13.653,14.6ZM20,13a7.927,7.927,0,0,1-2.409,5.715,1,1,0,1,1-1.4-1.43C20.039,13.684,17.268,6.9,12,7a6.024,6.024,0,0,0-5.939,5.142,1,1,0,0,1-1.98-.284C5.766,2.13,19.73,3.113,20,13Zm-6,0a2.013,2.013,0,0,1-3.184,1.612L5.949,16.748a1,1,0,1,1-.8-1.832l4.867-2.136A2,2,0,0,1,14,13Z",
];

const bgLinks = [
"https://www.youtube.com/channel/UCkuuvKL973p_36xk2sC9phg?sub_confirmation=1",
"https://open.spotify.com/playlist/2Z1e60Ts9AkBLUKVFuwjvp?si=f7f7a9dca3a7498c",
"https://open.spotify.com/playlist/3UbxPcawwl6FC7Q5HbKeKI?si=b2d7ce82545041fe",
];

let board, game, piece, block_size, autoInterval, dropInterval, bgColor;
let speed = 40 - Number(speedIcon.dataset.state) * 10;
let auto_speed = 750;
Expand Down Expand Up @@ -102,17 +108,11 @@ window.onload = () => {
}
});

let randomBgImage = Math.floor(Math.random() * 2) + 1;
let randomBgImage = Math.floor(Math.random() * bgLinks.length) + 1;
storedBlockCanvas.style.backgroundImage = `url(assets/shoutout_${randomBgImage}.png)`;

storedBlockCanvas.onclick = () => {
let bgImage = storedBlockCanvas.style.backgroundImage;

if (bgImage.includes("1")) {
window.open("https://www.youtube.com/channel/UCkuuvKL973p_36xk2sC9phg?sub_confirmation=1");
} else if (bgImage.includes("2")) {
window.open("https://open.spotify.com/playlist/2Z1e60Ts9AkBLUKVFuwjvp?si=f7f7a9dca3a7498c");
}
window.open(bgLinks[randomBgImage]);
};

document.addEventListener("visibilitychange", () => {
Expand Down

0 comments on commit 77ef9da

Please sign in to comment.