Minor canvas improvements
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user