-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
4. to releaseReady to be released and/or waiting for tests to finishReady to be released and/or waiting for tests to finishenhancementfeature: files
Description
Hello
It would be a great enhancement to prevent right click on shared file when "hide download" is on
It can be as simple as adding this js to the file apps/files_sharing/js/public.js
//prevent right-click when download is hidden
if (hideDownload === 'true') {
document.addEventListener("contextmenu", function(e){
e.preventDefault();
}, false);
}
Or this code (using JQuery)
//prevent right-click when download is hidden
if (hideDownload === 'true') {
$(document).on('contextmenu', function () {
return false;
});
}
I know the user is still able to bypass that but at least it is not that easy to download a file
I know also here we prevent the right click on the whole page (because of document), you can narrow it down to the exact div if you know which one).
At least it works
Has something like this a chance to be implemented in mainline ? So everyone will get this functionality.
All the best
Arnaud
elhananjair
Metadata
Metadata
Assignees
Labels
4. to releaseReady to be released and/or waiting for tests to finishReady to be released and/or waiting for tests to finishenhancementfeature: files