Add sample song IDs
This commit is contained in:
@@ -480,6 +480,21 @@ window.onhashchange = () => {
|
||||
|
||||
const MAX_REQUESTS = 10;
|
||||
const REQUEST_POLL_MS = 5000;
|
||||
|
||||
/** BeatSaver map keys for the debug “example” control (cycles on each click). */
|
||||
const DEBUG_BSR_EXAMPLE_IDS = [
|
||||
"43239",
|
||||
"4b55e",
|
||||
"49201",
|
||||
"35a5e",
|
||||
"2c25a",
|
||||
"3864b",
|
||||
"2d205",
|
||||
"41d08",
|
||||
"e298",
|
||||
] as const;
|
||||
let debugBsrExampleIndex = 0;
|
||||
|
||||
const requestListEl = must<HTMLOListElement>("requestList");
|
||||
const requestOverlayEl = must<HTMLElement>("requestOverlay");
|
||||
const requestEmptyEl = must<HTMLElement>("requestEmpty");
|
||||
@@ -641,6 +656,18 @@ async function bootstrap() {
|
||||
void applyDebugSong();
|
||||
}
|
||||
};
|
||||
const debugSongIdExampleBtn = must<HTMLButtonElement>("debugSongIdExample");
|
||||
const syncDebugBsrExampleButton = () => {
|
||||
debugSongIdExampleBtn.textContent = DEBUG_BSR_EXAMPLE_IDS[debugBsrExampleIndex];
|
||||
};
|
||||
syncDebugBsrExampleButton();
|
||||
debugSongIdExampleBtn.onclick = () => {
|
||||
const id = DEBUG_BSR_EXAMPLE_IDS[debugBsrExampleIndex];
|
||||
debugBsrExampleIndex = (debugBsrExampleIndex + 1) % DEBUG_BSR_EXAMPLE_IDS.length;
|
||||
debugSongIdInput.value = id;
|
||||
debugSongIdInput.dispatchEvent(new Event("input", { bubbles: true }));
|
||||
syncDebugBsrExampleButton();
|
||||
};
|
||||
|
||||
document.documentElement.onclick = () => document.body.classList.toggle("preview");
|
||||
must<HTMLElement>("settings").onclick = (e: MouseEvent) => e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user