-
Notifications
You must be signed in to change notification settings - Fork 641
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
move inline javascript to its own file #347
Conversation
@max-nextcloud would be cool if you could give me a review on this :) |
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.
The move seems fine. Commenting on the code never the less as I don't think it does what it is intended for.
@@ -0,0 +1,13 @@ | |||
if (document.hasFocus()) { |
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.
My understanding is that this check will be triggered once - when the js is loaded and evaluated for the first time.
If the document does not have the focus then the rest will never be executed.
I think setTimeout
should always be called and the if condition should live inside the function of setTimeout
. That way we'd periodically check if the document has focus now and reload if that is the case.
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.
if the document does not have focus it will display a reload button that is inserted by default. always setting the timeout did not work for me unfortunatley if I remember correctly.
Thanks for the review and this comment :) |
Signed-off-by: szaimen <szaimen@e.mail.de>
3e85a78
to
4c304d8
Compare
Signed-off-by: szaimen szaimen@e.mail.de