« get me outta code hell

content: wiki wallpaper parts - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generatePageLayout.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-05-27 19:07:05 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-05-27 19:07:05 -0300
commit03343c785c1743fd0240f975a14700e4edfda799 (patch)
tree5a03567b5fb0bb9ef20a5ddf48b11f3513685936 /src/content/dependencies/generatePageLayout.js
parentcbde2a5204f82e63c7c86833fb8fc24a74085d9c (diff)
content: wiki wallpaper parts
Diffstat (limited to 'src/content/dependencies/generatePageLayout.js')
-rw-r--r--src/content/dependencies/generatePageLayout.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js
index a0552454..0326f415 100644
--- a/src/content/dependencies/generatePageLayout.js
+++ b/src/content/dependencies/generatePageLayout.js
@@ -603,13 +603,18 @@ export default {
 
     const fallbackWallpaperStyleTag =
       (slottedWallpaperStyleTag
-        ? ''
+        ? html.blank()
         : relations.wikiWallpaperStyleTag);
 
+    const usingWallpaperStyleTag =
+      (slottedWallpaperStyleTag
+        ? slottedWallpaperStyleTag
+        : html.resolve(fallbackWallpaperStyleTag, {normalize: 'tag'}));
+
     const numWallpaperParts =
-      (slottedWallpaperStyleTag &&
-       slottedWallpaperStyleTag.attributes.has('data-wallpaper-mode', 'parts')
-        ? parseInt(slottedWallpaperStyleTag.attributes.get('data-num-wallpaper-parts'))
+      (usingWallpaperStyleTag &&
+       usingWallpaperStyleTag.attributes.has('data-wallpaper-mode', 'parts')
+        ? parseInt(usingWallpaperStyleTag.attributes.get('data-num-wallpaper-parts'))
         : 0);
 
     const wallpaperPartsHTML =