forked from davidtodd/landmarks
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Guard against rapid changes #139
Merged
Merged
Conversation
This file contains 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
matatk
force-pushed
the
guard-against-rapid-changes
branch
from
January 18, 2018 09:22
d8a35ae
to
02cbbda
Compare
* Back off exponentially when getting more mutation events. * After events stop, decrease the pause linearly. * Factor out the handling of this into PauseHandler. * Minor tidy-ups in LandmarksFinder.
* Add option to the options page. * Tweak spacing on optoins page. * Add a message for the option name. * Hook up PauseHandler to the option and changes to it.
* Opera supports the storage.sync object, even though it does not support synching. * Fixes #132.
* Seems GitHub doesn't render "---" as an em-dash, so revert to the HTML character code. * Update info on the mutation guarding changes. * Use bold text for the "definition" parts of the keyboard shortcuts, and re-word slightly for generality of input devices :-). * Add notes about the more minor PRs that went into this release.
* To keep the naming consistent. * To keep alphabetical order matching logical order. * Use just Error instead of "new Error".
* Remove unused translation message. * Simplify LandmarksFinder API and rename functions for clarity (they are getters). This fixes a bug that was there for ages whereby it was not calling the function to check the number of landmarks found (in checkFocusElement()). * Vastly simplify the bootstrapping code in content.overall.js. * Move Logger to content.overall.js from content.pausing.js and generalise. * Remove Logger from content.pausing.js. * Disconnect observer if content script has been retired (fixes #131).
* Remove magic numbers in all setTimeout() calls. * If landmarks might be out-of-date, re-scan when using the button or keyboard shortcuts. * Make injected landmarks test page less verbose.
Oops; had failed to do this right last time :-).
Bind the logging function to the console so that it can correctly work out where the log message originated.
matatk
force-pushed
the
guard-against-rapid-changes
branch
from
January 19, 2018 12:36
02cbbda
to
b69c4bd
Compare
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.
This implements an adaptive performance adjustment to mitigate against many mutations happening within a short space of time on a page. Details on how this works can be found in #127.
This guards against any changes to the DOM, not just those that get checked and ultimately trigger a scan for landmarks. The reason is that if there are many changes that are not related to landmarks, that could still slow things down.
In support of this, a lot of refactoring and simplification of the content script has occurred.