kino
v1.0.0-alpha.6
Published
Remote
Downloads
5
Readme
Kino
A chrome extension to easily manipulate chrome pages from the comfort of your text editor or OS.
Usage
- Install kino
npm i kino -g
and runkino init
to create the native messaging host - Install the chrome plugin via the chrome web store
- Install an editor plugin like the vim plugin or the CLI via
kino action
directly
By default, there are actions defined for toggling video playback on youtube.com and egghead.io as an example. You can add other domains and define custom actions for them via the options page. Once this is done, you can trigger an action using the client to play the code for that action on an active chrome tab for the corresponding domain.
Here's a quick start video to help you get up and running:
Todo
- [x] spike extension -> native message host
- [x] spike application -> native message host
- [x] spike extension -> content script -> player controls (youtube)
- [x] user defined commands
- [x] Figure out a more universal away to do pathing for node in host
Niceties:
- [ ] Page action that allows you to add a host/action from the current page
- [ ] Local storage based logging for troubleshooting
- [ ] Pass metadata though action messages?
Troubleshooting
There's currently not a great way to troubleshoot Kino issues without installing the extension unpacked. There are a few things you can do without going into Dev mode:
Common issues
- have you installed
kino
globally and runkino init
? - Is
node
available at/usr/local/bin/node
? If not,ln -s <path to node> /usr/local/bin/node
and disable/enable the extension- alas, chrome cannot use
/usr/bin/env node
when launching the native extension host
- alas, chrome cannot use
Contributing
- Fork repo
- Clone down repo
- In chrome, go to
tools > extensions
- Click "load unpacked extension"
- Navigate to the repository directory and load it
- Take note of the "id: " under the loaded extension and add it to the
allowed_origins
array inhost/com.nicktomlin.kino.json
- Run
./bin/kino init
to install the native messaging host - Reload the extension
There is very light logging available via the background page:
- Open the background page (or menu > "more tools" > "extensions" and click "background page")
- Open the console
- hit reload and see what error messages pop up
- attempt to send a kino action
kino action toggle
and see if there is any logging