From 5a5098ad11d3a40cb3c7729bffd518ddd458cdd2 Mon Sep 17 00:00:00 2001 From: uwaa Date: Fri, 10 Jan 2025 08:55:16 +0000 Subject: [PATCH] quick fix for special page themes --- rot.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/rot.js b/rot.js index 99ea30e..977227b 100644 --- a/rot.js +++ b/rot.js @@ -135,12 +135,15 @@ waitUntil("#music-mute").then((box) => { //Theme application function applySpecialTheme() { - let pageMusic = document.querySelector('meta[name="pageMusic"]')?.content || document.getElementById("pageMusic")?.getAttribute("href"); - setMusic(pageMusic); - playMusic(); - - let pageImage = document.querySelector('meta[name="pageImage"]')?.content || document.getElementById("pageImage")?.getAttribute("href"); - setImage(pageImage); + setTimeout(() => { + let pageMusic = document.querySelector('meta[name="pageMusic"]')?.content || document.getElementById("pageMusic")?.getAttribute("href"); + console.log(pageMusic); + setMusic(pageMusic); + playMusic(); + + let pageImage = document.querySelector('meta[name="pageImage"]')?.content || document.getElementById("pageImage")?.getAttribute("href"); + setImage(pageImage); + }, 1000); } function applyUserTheme() {