Age | Commit message (Collapse) | Author |
|
Add a `sleep` just in case we need that to have time to print the
message.
Use the `jsown` project for JSON encoding and decoding.
|
|
Define the package so we can define things inside it.
|
|
|
|
Trying to see if I can write the program in Common Lisp. Learned how to
set up an .asd project file and started with some websocket client code
based on the example in:
https://github.com/fukamachi/websocket-driver#client-side
Need to work out how to set up JSON interaction.
|
|
Tried to parse the response from the `GetTargets` message, but ended up
with this error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err`
value: Error("unknown variant `iframe`, expected one of `page`,
`background_page`, `service_worker`, `browser`, `other`", line: 0,
column: 0)',
/Users/tw/.cargo/registry/src/github.com-1ecc6299db9ec823/headless_chrome-0.9.0/src/protocol/mod.rs:90:70
Looks like the `headless_chrome` library doesn't include "iframe" as a
`TargetType`:
https://docs.rs/headless_chrome/0.9.0/headless_chrome/protocol/target/enum.TargetType.html
Will have to modify the library, use a different library, or write my
own types to serialize & deserialize.
|
|
Get the list of targets using the Chrome DevTools protocol. Going to use
this to reload the specified extensions since it isn't possible using
the Chrome extension `management` API.
|
|
Get the extension IDs from the Native Messaging host and reload the
specified extensions. Also reload the current tab.
Turns out this doesn't work the way I expected. It does disable and
re-enable the extension, but it doesn't reload the extension as with
`chrome.runtime.reload()`. This means the specified extension isn't
reloaded with the latest code changes.
Unfortunately, it looks like there's no API to do what I want, and
unless there's some magic in the `chrome.debugger` API I'll have to give
up on this project.
|
|
Send hard-coded extension IDs to the companion extension to tell it to
reload them. Start an event loop to keep the native host running
indefinitely.
We'll then be able to send extension IDs from a command line client to
the native host over a Unix domain socket IPC.
|
|
Use the reverse DNS name in the manifest to ensure that it's unique.
|
|
Add Native Messaging host manifest. Use a temporary path until we come
up with an install script that can reference a more permanent path.
|
|
Allows us to get a permanent extension ID that we can refer to for
Native Messaging (ID: pacpdcpgfbpkdpmhfaljffnfbdanmblh).
Generated the key with:
$ openssl rsa -in key.pem -pubout -outform DER 2>/dev/null | openssl base64 -A && echo
Using the explanation provided by Rob W
(https://stackoverflow.com/users/938089/rob-w) on Stack Overflow:
https://stackoverflow.com/questions/23873623/obtaining-chrome-extension-id-for-development/23877974#23877974
|
|
|
|
|