Initial attempt at splash screen #187
Merged
Conversation
* Adds command info in a dynamically-generated table to the normal splash page. * On Chrome it adds a button that can be used to alter keyboard shortcuts. * Fixes Error() calls to use string concatenation as only the first argument is printed.
* On Firefox it suggests a key for the newly-added command, but on Chrome it is not allowed, so it highlights that the command is not configured (needs much visual design work). * Switch "id" for "listen" to clean up the code a bit.
* Not sure if this is the right thing to do long-term, as it creates potential compatibility issues in future, but it seems a lot simpler than having to somehow convert the README into the required JavaScript calls to re-create all the README sections on a blank page (due to the limitation that content scripts are not allowed on bundled HTML pages, this seems the only way to bundle it, for maximum compatibility, and comply with the requirement to not use .innerHTML et al). * The Installation section is removed, as it is irrelevant once the extension has been installed. * The content of the "Via Shortcut Key" section is replaced by the table. * Some checks are put in to try to avoid making changes if the README format changes significantly in future. * Some TODOs remain that would make those checks more generic.
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.
This uses a special content script to update the README page to show the current keyboard shortcuts and, on Chrome, to allow them to be changed.
This is a very early attempt. I would like to do a proper help page, but it’s very difficult to do that in a way that doesn’t use .innerHTML but also allows the content scripts to run (they won’t run on bundled pages).
This is only early work, but not sure exactly how to proceed, so merging this now, and will work on other features whilst letting it percolate, and hopefully will come up with something closer to what I'd ideally like to implement.
In support of #165