Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/js/public.js8
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) {