summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/main.js15
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