| Age | Commit message (Collapse) | Author | 
|---|
|  | Move the `isDebug` check to a function so we don't have to put
conditions everywhere. | 
|  |  | 
|  | There was a problem reloading the tab from an MV2 extension, and
reloading the extension after the first time. Looks like I needed to
cancel the context in order to be able to evaluate other statements in
the background page. | 
|  | There may be multiple instances of the same extension ID. Ensure all of
them are reloaded. | 
|  | No change. | 
|  | Call getTargets only once, not each time we want to reload an extension.
This hasn't resolved the wonkiness I'm seeing with reloading multiple
extensions, unfortunately. | 
|  |  | 
|  | Turns out this is what was closing the extension background page
DevTools window. We shouldn't run the context cancel function. | 
|  | Trying to set things up to not get targets again when reloading the
current tab. | 
|  | Trying to make it so you can reload the tab only once after reloading
all extensions.
This still works for a single Manifest V3 extension, but I'm having
trouble getting a Manifest V2 extension to reload properly. | 
|  |  | 
|  | Get rid of the `return` so we reload more than the first extension. | 
|  | Copy the man page from Extreload and just change the name of the
executable. | 
|  |  | 
|  |  | 
|  |  | 
|  | Make the tab reload work based on the flag instead of always reloading. | 
|  | Print errors in a consistent way instead of using `log`, which was just
for rapid development.
Also exit using codes that make sense. | 
|  | Condition printing debug output on the presence of this flag. | 
|  |  | 
|  | Add our own errors and return these instead of logging them. | 
|  | Run the reload on multiple extensions. | 
|  |  | 
|  | In order to print a custom error message for missing extension IDs, I
needed to set a default value for it.
Looks like the type assertions are necessary. Not the cleanest, but no
matter. | 
|  | Found Claw from a search for "argument parser" on https://godocs.io. I
did a quick comparison with a few other argument parsing libraries I
found in a GitHub search:
* https://github.com/alexflint/go-arg
* https://github.com/docopt/docopt.go
* https://github.com/fred1268/go-clap
Claw ended up being the most straightforward to me. | 
|  |  | 
|  | Put the executable in a cmd/ directory. | 
|  | Move everything to our library. | 
|  |  | 
|  | Don't make this a public API. I'd rather do something simple and bad to
get this finished quickly. | 
|  | An idea for a library function to reload an extension. | 
|  | I was having a hard time jiggering the Extreload code to get tab
reloading working with Manifest V3 extensions. This is an experiment
using a better API to interact with the Chrome DevTools Protocol. It
does correctly reload a Manifest V3 extension's current tab, by sleeping
briefly to wait for the service worker to reinstall, then executing the
tab reload call. |