summaryrefslogtreecommitdiff
path: root/assets/js/main.js
blob: b27f7f1c35ae4ce7dd86e556dc58e93d8339b8d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}`);
        };

    }
});