Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ext extends base
/**
* {@inheritdoc}
*/
public function is_enableable(): bool|array
public function is_enableable(): array|bool
{
$config = $this->container->get('config');
return $this->version_check($config['version']) && $this->version_check(PHPBB_VERSION);
Expand Down
18 changes: 18 additions & 0 deletions styles/all/template/event/overall_footer_body_after.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{# Disable opening attached images in Progressive Web Apps #}
{% if S_VIEWTOPIC %}
<script>
const isStandalone = window.matchMedia('(display-mode: standalone)').matches
|| window.navigator.standalone === true;

if (isStandalone) {
document.querySelectorAll('a > img.postimage').forEach(img => {
const link = img.closest('a');
if (link) {
link.addEventListener('click', e => {
e.preventDefault();
});
}
});
}
</script>
{% endif %}