diff options
Diffstat (limited to 'mu4web/static')
-rw-r--r-- | mu4web/static/content-blocked.svg | 9 | ||||
-rw-r--r-- | mu4web/static/enable_images.js | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mu4web/static/content-blocked.svg b/mu4web/static/content-blocked.svg new file mode 100644 index 0000000..4bab3a2 --- /dev/null +++ b/mu4web/static/content-blocked.svg @@ -0,0 +1,9 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200" + style="background-color: black"> + <rect x="0" y="0" width="100%" height="100%"/> + <text + x="50%" y="50%" + text-anchor="middle" + dominant-baseline="middle" + style="fill: red; font-size: 50px">Image blocked</text> +</svg> 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; + }) + } + } +}) |