Minor canvas improvements

This commit is contained in:
2026-10-04 15:34:47 +02:00
parent 2903986f44
commit 95002a34ad
3 changed files with 3 additions and 3 deletions
+2
View File
@@ -132,6 +132,8 @@
// Folders end with "/" — let the browser navigate normally.
var path = (item && item.dataset.path) || anchor.getAttribute('href');
if (!path || path.endsWith('/')) return;
// Canvases open in the wiki's own canvas view.
if (/\.canvas$/i.test(path.split(/[?#]/)[0])) return;
// Allow modified clicks (open in new tab, etc.) to pass through.
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
var rel = wikiPathFromHref(path);