From b52aac1a11d04922762cad4e3e8bc1a709f44c08 Mon Sep 17 00:00:00 2001 From: stackxp Date: Wed, 24 Dec 2025 22:01:59 +0100 Subject: [PATCH] Show regular right-click menu by using shift --- copyparty/web/browser.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 9e03ca03..3913894a 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -266,8 +266,7 @@ if (1) "cdt_lim": "max number of files to show in a folder", "cdt_ask": "when scrolling to the bottom,$Ninstead of loading more files,$Nask what to do", "cdt_hsort": "how many sorting rules (<code>,sorthref</code>) to include in media-URLs. Setting this to 0 will also ignore sorting-rules included in media links when clicking them", - "cdt_ren": "enable custom right-click menu", - "cdt_rno": "enable normal menu when double right-clicking", + "cdt_ren": "enable custom right-click menu, you can still access the regular menu by pressing the shift key and right-clicking", "tt_entree": "show navpane (directory tree sidebar)$NHotkey: B", "tt_detree": "show breadcrumbs$NHotkey: B", @@ -985,13 +984,7 @@ ebi('op_cfg').innerHTML = ( ' \n' + '\n' + '

' + L.cl_keytype + '

\n' + - (!MOBILE ? '
' + - '

' + L.cl_rcm + '

' + - '
' + - ' enable' + - ' double-click' + - '
' + - '
' : '') + + (!MOBILE ? '

' + L.cl_rcm + '

enable
' : '') + '

' + L.cl_hiddenc + '  ' + (MOBILE ? '' + L.cl_hidec + ' / ' : '') + '' + L.cl_reset + '

' ); @@ -9453,11 +9446,9 @@ var rcm = (function () { return {enabled: false} var r = { - enabled: true, - double: true + enabled: true }; bcfg_bind(r, 'enabled', 'ren', true); - bcfg_bind(r, 'double', 'rno', true); var menu = ebi('rcm'); var selFile = { @@ -9638,13 +9629,11 @@ var rcm = (function () { menu.style.display = ''; } - var lrcTime = null; ebi('wrap').oncontextmenu = function(e) { hide(true); - if (thegrid.en || !r.enabled || (r.double && lrcTime && e.timeStamp - lrcTime < 500)) { + if (thegrid.en || !r.enabled || e.shiftKey) return true; - } else { - lrcTime = e.timeStamp; + else { ev(e); show(e.clientX, e.clientY, e.target); return false;