mirror of
https://codeberg.org/vlw/still-alive.git
synced 2025-09-14 00:13:41 +02:00
Fixed the scroll direction for lyrics, made the art window's font clamp (and centered) and also removed some loggers. player.html will redirect to the main page if opened without a hash and will no longer be caught by crawlers that care about robots.txt
18 lines
No EOL
576 B
JavaScript
18 lines
No EOL
576 B
JavaScript
import { default as Player } from "./modules/StillAlivePlayer.mjs";
|
|
|
|
// Go to start page if location.hash is omitted
|
|
if(!window.location.hash) {
|
|
// Close this window, if we can
|
|
window.close();
|
|
|
|
// Otherwise redirect to main page
|
|
const page = window.location.pathname.split("/");
|
|
const url = window.location.href.replace(page[page.length - 1],"");
|
|
window.location.replace(url);
|
|
}
|
|
|
|
// Add location.hash to body classList
|
|
document.body.classList.add(window.location.hash.substring(1));
|
|
|
|
const element = document.getElementById("player");
|
|
const player = new Player(element); |