From 8b4b7fa79474812cd9784e58adc88832b1c76852 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 30 Jun 2021 01:08:20 +0200 Subject: [PATCH] allow opening tree nodes in a new tab --- copyparty/web/baguettebox.js | 2 +- copyparty/web/browser.js | 5 ++++- copyparty/web/up2k.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index 907daff2..d10a26dc 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -119,7 +119,7 @@ window.baguetteBox = (function () { var gallery = []; [].forEach.call(tagsNodeList, function (imageElement, imageIndex) { var imageElementClickHandler = function (event) { - if (event && event.ctrlKey) + if (event && (event.ctrlKey || event.metaKey)) return true; event.preventDefault ? event.preventDefault() : event.returnValue = false; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 6540339b..c973503d 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1545,7 +1545,7 @@ var thegrid = (function () { setsz(); function gclick(e) { - if (e && e.ctrlKey) + if (e && (e.ctrlKey || e.metaKey)) return true; var oth = ebi(this.getAttribute('ref')), @@ -2265,6 +2265,9 @@ var treectl = (function () { } function treego(e) { + if (e && (e.ctrlKey || e.metaKey)) + return true; + ev(e); if (this.getAttribute('class') == 'hl' && this.previousSibling.textContent == '-') { diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 83914b01..8a511ab5 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -32,7 +32,7 @@ catch (ex) { } catch (ex) { } } -treectl.onscroll(); +window['treectl'].onscroll(); // uhh function up2k_flagbus() {