diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-02-07 01:30:54 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-02-07 01:30:54 +0100 |
commit | e11826cf81374af28d81d12fdef3f69fd0d03eae (patch) | |
tree | 1642dd5f06dc3ce4163286d9e908637fad6ce428 /mu4web/static/enable_images.js | |
parent | Add various TODOs (diff) | |
download | mu4web-e11826cf81374af28d81d12fdef3f69fd0d03eae.tar.gz mu4web-e11826cf81374af28d81d12fdef3f69fd0d03eae.tar.xz |
Also rewrite script, a, and img tags without cid uri:s.
Diffstat (limited to 'mu4web/static/enable_images.js')
-rw-r--r-- | mu4web/static/enable_images.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mu4web/static/enable_images.js b/mu4web/static/enable_images.js new file mode 100644 index 0000000..6a85135 --- /dev/null +++ b/mu4web/static/enable_images.js @@ -0,0 +1,10 @@ +window.addEventListener('load', () => { + for (let img of document.querySelectorAll('img')) { + let true_source; + if ((true_source = img.dataset.src)) { + img.addEventListener('click', () => { + img.src = true_source; + }) + } + } +}) |