diff options
author | Francesco <tomaselli.fr@gmail.com> | 2024-04-22 17:12:48 +0200 |
---|---|---|
committer | Francesco <tomaselli.fr@gmail.com> | 2024-04-22 17:12:48 +0200 |
commit | b34fd641941143b856d5721b89d6233d5dbbe3d3 (patch) | |
tree | 1df8a693aa6402cdfc2cddfdf21b30f432d2a3b7 /assets/js/main.js | |
parent | 65817dee0444e28ec0b5da2a75a15aab55dbe730 (diff) |
Theme Update
Diffstat (limited to 'assets/js/main.js')
-rw-r--r-- | assets/js/main.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index e2aac52..b27f7f1 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1 +1,14 @@ -console.log('This site was generated by Hugo.'); +const images = document.querySelectorAll('img'); + +images.forEach(img => { + + if (img.src.endsWith('#dark-mode')) { + + console.log('found'); + + img.onload = function () { + console.log(`Image loaded: ${img.src}`); + }; + + } +});
\ No newline at end of file |