-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve hidedownload #31950
improve hidedownload #31950
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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