Conversation
ad80138 to
d0a9dd6
Compare
apps/files_sharing/js/public.js
Outdated
| // Blur elements when window has no focus | ||
| if (hideDownload === 'true') { | ||
| let sheet = document.createElement('style'); | ||
| sheet.innerHTML = ".blur { filter: blur(30px); }" | ||
| document.body.appendChild(sheet); | ||
|
|
||
| setInterval(function () { | ||
| if (document.hasFocus()) { | ||
| document.body.classList.remove('blur'); | ||
| } else { | ||
| document.body.classList.add('blur'); | ||
| } | ||
| }, 300); | ||
| } |
There was a problem hiding this comment.
question is if the blur makes sense at all? because some screenshot tools might be able to be activated without moving the focus away from the tab.
There was a problem hiding this comment.
As this feature is "let's make it difficult to extract the document" then I think it is ok.
|
Also, should this really be included in hideDownload or a different setting? If we opt for including it in this setting, we should maybe consider renaming it... |
|
Additionally, it would probably be good if someone with a mac could test if everything works as expected on that platform, too. |
ee07d99 to
32f1189
Compare
Signed-off-by: szaimen <szaimen@e.mail.de>
32f1189 to
465c3c2
Compare
| .blur_body { | ||
| filter: blur(5px); | ||
| } |
There was a problem hiding this comment.
Some transition to make it smoother?
| .blur_body { | |
| filter: blur(5px); | |
| } | |
| body { | |
| transition: filter 0.15s; | |
| &.blur_body { | |
| filter: blur(5px); | |
| } | |
| } |
| } else { | ||
| document.body.classList.add('blur_body'); | ||
| } | ||
| }, 300); |
There was a problem hiding this comment.
Will change that to 150ms: 300ms feels too slow.
|
Supersede by #32343 |
With this change getting the original previews and files gets again much more complicated. We are now pretty near the goal of only being able to get the files using the browser inspector, an external tool or a screenshot tool.
What works in my testing:
not sure if this makes sense at all because some screenshot tools might be able to be activated without moving the focus away from the tab.Seems to make sense indeed.TODO:
Signed-off-by: szaimen szaimen@e.mail.de