Skip to content

Commit

Permalink
ランダム背景読み込みテスト
Browse files Browse the repository at this point in the history
  • Loading branch information
koma0504 committed Apr 6, 2024
1 parent 74ed6b0 commit 7289413
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ts/randomBgImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export function displayImageBasedOnTheme(): void {
return;
}

// ダークモードとライトモードの画像パスを配列で定義
const darkThemeImagePaths = ["../images/image_dark01.jpg", "../images/image_dark02.jpg", "../images/image_dark03.jpg", "../images/image_dark04.jpg"];
const lightThemeImagePaths = ["../images/image_light02.jpg", "../images/image_light03.jpg", "../images/image_light04.jpg", "../images/image_light05.jpg", "../images/image_light06.jpg"];

Expand All @@ -34,5 +33,4 @@ export function displayImageBasedOnTheme(): void {
addObserver(updateImage);
updateImage(getCurrentTheme());
}

document.addEventListener("DOMContentLoaded", displayImageBasedOnTheme);
displayImageBasedOnTheme();

0 comments on commit 7289413

Please sign in to comment.