diff options
author | szaimen <szaimen@e.mail.de> | 2022-02-26 14:20:56 +0100 |
---|---|---|
committer | szaimen <szaimen@e.mail.de> | 2022-03-03 14:02:41 +0100 |
commit | 40a51e0e038b970f21f7f1da425ac81c9cd39e92 (patch) | |
tree | 38b0e5176264731a8bbbcd88bd3606db8b32998e | |
parent | 9254fe2d3d9dba572f9f5e831eda5f0896e82e3e (diff) | |
download | nextcloud-server-40a51e0e038b970f21f7f1da425ac81c9cd39e92.tar.gz nextcloud-server-40a51e0e038b970f21f7f1da425ac81c9cd39e92.zip |
prevent right-click when hideDownload is enabled
Signed-off-by: szaimen <szaimen@e.mail.de>
-rw-r--r-- | apps/files_sharing/js/public.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index b31022fc2cc..6b063896b7f 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -50,6 +50,14 @@ OCA.Sharing.PublicApp = { var token = $('#sharingToken').val(); var hideDownload = $('#hideDownload').val(); + // Prevent all right-click options if hideDownload is enabled + if (hideDownload === 'true') { + window.oncontextmenu = function(event) { + event.preventDefault(); + event.stopPropagation(); + return false; + }; + } // file list mode ? if ($el.find('#filestable').length) { |