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

Initial attempt at splash screen #187

Merged
merged 6 commits into from Jul 29, 2018
Merged

Initial attempt at splash screen #187

merged 6 commits into from Jul 29, 2018

Conversation

@matatk
Copy link
Owner

@matatk matatk commented Jul 29, 2018

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

matatk added 6 commits Jun 23, 2018
* 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.
Bumps
* Bump extension version.
* Use latest depedencies.
@matatk matatk merged commit eed0ef4 into master Jul 29, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@matatk matatk deleted the splash branch Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.