prevent right-click when hideDownload is enabled

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-02-26 14:20:56 +01:00 committed by backportbot[bot]
parent 4fc2a276b4
commit d1ae6ee0e5

View file

@ -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) {