scratch
All checks were successful
Build and push container image / build-and-push-image (push) Successful in 6m3s

This commit is contained in:
2026-02-09 13:34:47 +00:00
parent 9700a5dc7f
commit b4e6b4c296
14 changed files with 131 additions and 63 deletions

View File

@@ -72,41 +72,58 @@ typing();
// HIDDEN STUFF (shh don't tell anyone >:3)
let last5Chars = "";
let last15Chars = "";
document.addEventListener('keydown', function(event) {
last5Chars += event.key;
if (last5Chars == "furry") {
last15Chars += event.key;
if (last15Chars.includes("furry")) {
console.log("owo, whats this?");
document.getElementById('furry').style.display = 'block';
last15Chars = "";
}
if (last5Chars == "irken") {
if (last15Chars.includes("irken")) {
console.log("doom doom doom!");
document.querySelector(":root").style.setProperty('--font-family', 'Irken');
document.querySelector(":root").style.setProperty('--title-font', '1.5em');
last15Chars = "";
}
while (last5Chars.length >= 5) {
last5Chars = last5Chars.slice(1);
if (last15Chars.includes("scratch")) {
console.log("space chicken");
document.querySelector(":root").style.setProperty('--font-family', 'Scratch');
document.querySelector(":root").style.setProperty('--title-font', '1em');
last15Chars = "";
}
while (last15Chars.length >= 15) {
last15Chars = last15Chars.slice(1);
}
});
// Spotify API (now lastfm)
function getSpotify() {
fetch('/lastfm/info').then(response => {
fetch('https://api.alfieking.dev/spotify/nowplaying/xz02oolstlvwxqu1pfcua9exz').then(response => {
return response.json();
}).then(data => {
document.getElementById('spotify').style.backgroundImage = "url(" + data.image + ")";
document.getElementById('spotify-title').innerHTML = data.track;
document.getElementById('spotify-artist').innerHTML = data.artist;
if (data.item == null) {
document.getElementById('spotify').style.backgroundImage = "none";
document.getElementById('spotify-title').innerHTML = "Spotify is not playing anything";
document.getElementById('spotify-artist').innerHTML = ":(";
document.getElementById('spotify-link').href = "https://open.spotify.com/";
return;
}
document.getElementById('spotify').style.backgroundImage = "url(" + data.item.album.images[0].url + ")";
document.getElementById('spotify-title').innerHTML = data.item.name;
document.getElementById('spotify-artist').innerHTML = data.item.artists[0].name;
document.getElementById('spotify-link').href = data.item.external_urls.spotify;
});
}
if (document.getElementById('spotify')) {
getSpotify();
setInterval(getSpotify, 60000);
setInterval(getSpotify, 15000);
}
// load buttons
function loadButtons() {