We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cbbb7c7 + 81fea3d commit 1a18c1cCopy full SHA for 1a18c1c
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