-
-
Notifications
You must be signed in to change notification settings - Fork 85
Reload the Page if we miss the Drip #71
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
Merged
mikebronner
merged 10 commits into
mikebronner:master
from
ItaloBC:ItaloBC-ReloadOnOldDrip
Dec 9, 2017
Merged
Reload the Page if we miss the Drip #71
mikebronner
merged 10 commits into
mikebronner:master
from
ItaloBC:ItaloBC-ReloadOnOldDrip
Dec 9, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, changed the JavaScript to check the old drip, send the drip and check oldness at different intervals.
Now it works.
@ItaloBC Thanks for creating this PR! :) I will take a look at it and update the failing unit tests. |
Repository owner
deleted a comment from
coveralls
Dec 9, 2017
Repository owner
deleted a comment from
coveralls
Dec 9, 2017
Repository owner
deleted a comment from
coveralls
Dec 9, 2017
mikebronner
added a commit
that referenced
this pull request
Dec 9, 2017
commit 39d5b7a Merge: 986d780 fe3c184 Author: Mike Bronner <mike@genealabs.com> Date: Sat Dec 9 09:19:17 2017 -0800 Merge pull request #71 from ItaloBC/ItaloBC-ReloadOnOldDrip Reload the Page if we miss the Drip commit fe3c184 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 12:35:33 2017 -0300 Fixed the calc between old/missed drips Now it works. commit 37426aa Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 12:18:26 2017 -0300 Wtf was I doing? threshold is fine by itself commit 32fd4f6 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 12:15:03 2017 -0300 Forgot to add the `interval` to the `threshold` commit bdba85f Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 12:11:55 2017 -0300 Changed variable to something more criptic commit bb8eac7 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 12:09:18 2017 -0300 Fixed the setInterval for dripping commit 94aeedf Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 11:48:15 2017 -0300 Threshold default now matches the config default commit 154d9b9 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 11:47:40 2017 -0300 Changed the old drip to a sensible 10 seconds commit caf1ad6 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 11:40:43 2017 -0300 Corrected functions to get the new settings. Also, changed the JavaScript to check the old drip, send the drip and check oldness at different intervals. commit a9d4fd6 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 11:36:34 2017 -0300 Added two new settings for checking old drips commit e624a51 Author: ItaloBC <ItaloBC@users.noreply.github.com> Date: Sat Dec 9 11:29:52 2017 -0300 Update Dripper.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Caffeine now will reload the page if the last drip misses, something that happen when the device (laptops, smartphones) go to sleep, halting the browser activity - in this case, pausing Caffeine Drip interval.
This is accomplished in this way;
csrf_token
.This allows to evade
TokenMismatchException
, that happens when the client requests with an invalid (old)csrf_token
after long time of network inactivity.If the page gets reloaded when there is no network connectivity, the browser is intelligent enough (at least on Chrome) to retrieve the page entirely once the connection reestablishes.
The Check Interval and the old/miss Threshold are configurable under the same config array, so it's not necessary to match it up to the application session lifetime.
Happy Holidays.