We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 40ac624 + 1a18c1c commit 88d2f60Copy full SHA for 88d2f60
styles/all/template/event/overall_footer_body_after.html
@@ -0,0 +1,18 @@
1
+{# Disable opening attached images in Progressive Web Apps #}
2
+{% if S_VIEWTOPIC %}
3
+<script>
4
+ const isStandalone = window.matchMedia('(display-mode: standalone)').matches
5
+ || window.navigator.standalone === true;
6
+
7
+ if (isStandalone) {
8
+ document.querySelectorAll('a > img.postimage').forEach(img => {
9
+ const link = img.closest('a');
10
+ if (link) {
11
+ link.addEventListener('click', e => {
12
+ e.preventDefault();
13
+ });
14
+ }
15
16
17
+</script>
18
+{% endif %}
0 commit comments