diff options
author | szaimen <szaimen@e.mail.de> | 2022-02-26 16:20:56 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-03-03 18:48:25 +0300 |
commit | d388921186baa7dcaaf03a206f9be1e648a58548 (patch) | |
tree | 3e16e3dcea4dfd6e556cede9f70ea6b5a1e5d71f /apps/files_sharing | |
parent | 90340585aae254edef36de2d5e30aa64a1921d9f (diff) |
prevent right-click when hideDownload is enabled
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'apps/files_sharing')
-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 3aa4ed78890..ec99d51d34e 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) { |