Skip to content
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

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

szaimen
Copy link
Collaborator

@szaimen szaimen commented Mar 11, 2022

Signed-off-by: szaimen szaimen@e.mail.de

@szaimen
Copy link
Collaborator Author

szaimen commented Mar 14, 2022

@max-nextcloud would be cool if you could give me a review on this :)

Copy link

@max-nextcloud max-nextcloud left a 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()) {

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.

Copy link
Collaborator Author

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.

@szaimen
Copy link
Collaborator Author

szaimen commented Mar 15, 2022

The move seems fine.

Thanks for the review and this comment :)
My question was basically if the move will work as intended but I'll obivously test this before releasing it 👍

Signed-off-by: szaimen <szaimen@e.mail.de>
@szaimen szaimen force-pushed the enh/noid/move-inline-js-to-file branch from 3e85a78 to 4c304d8 Compare March 16, 2022 12:07
@szaimen szaimen merged commit 79fdbee into main Mar 16, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/noid/move-inline-js-to-file branch March 16, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants