From f7773a3f1c920562d10fc2daf468716edae7a54a Mon Sep 17 00:00:00 2001 From: uwaa Date: Sat, 11 Jan 2025 06:41:06 +0000 Subject: [PATCH] remove redundant whitespaces --- rot.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rot.js b/rot.js index b70fa6d..9850409 100644 --- a/rot.js +++ b/rot.js @@ -48,7 +48,7 @@ function setMusic(url) { if (audio.src == url || (!url && audio.src === window.location.toString())) return; - + audio.pause(); if (url) { @@ -97,7 +97,7 @@ //Callback if (!resolve(element)) return; - + //Clean up for (const o of observers) o.disconnect(); @@ -116,13 +116,13 @@ function applyMainTheme() { console.log("Applying main theme"); setMusic(null); - + waitUntilSpecial('meta[name="pageMusic"]').then((pageMusic) => { setMusic(pageMusic.content); playMusic(); return true; }); - + waitUntilSpecial("#pageMusic").then((pageMusic) => { setMusic(pageMusic.getAttribute("href")); playMusic(); @@ -133,7 +133,7 @@ function applyUserTheme() { console.log("Applying user theme"); setMusic(null); - + waitUntilSpecial(".pin").then((pinnedPost) => { if (pinnedPost.nextElementSibling .querySelector(".StatusBody") @@ -142,7 +142,7 @@ .replace(/(<([^>]+)>)/ig, '') .search(/profile theming post/ig) == -1) return false; - + let ptp = pinnedPost.nextElementSibling.querySelector(".StatusBody"); if (ptp) { //Configured by post @@ -162,7 +162,7 @@ return false; } }, observers); - + waitUntilSpecial(".user-profile-field-name").then(() => { let fields = [...document.getElementsByClassName("user-profile-field-name")] if (fields.length != 0) { @@ -245,7 +245,7 @@ audio.loop = true; audio.id = "user-music"; audio.style = "display:none;"; - localStorage.audiovolume = (audio.volume = localStorage.audiovolume ? localStorage.audiovolume / 100 : 0.5) * 100; + localStorage.audiovolume = (audio.volume = localStorage.audiovolume ? localStorage.audiovolume / 100 : 0.5) * 100; //Initialize audio controls and event listeners waitUntil("#music-controls").then((controls) => {