My hunch is that, since the switch to using brow.sh as the default
homepage, the extra page load time has an undesirable effect on
subsequent requests for new tabs. For example, say that a new tab
is requested but the original brow.sh tab hasn't completed, but
it does complete halfway through another tab loading. Might it retake
focus and prevent DOM load events triggering in the user-requested
tab?
So for now, the quickest fix is just to increase the wait time in the
tests. The better fix, if my hunch is right, would be to detect and
wait for the original launch-time tab to finish.
Such a big commit to provide a fix which really only involves a few
lines in the graphics builder. It would seem that the very first time
the BlockCharMono font is rendered it needs a little delay. So there's a
refactor here to use a callback when requesting a screenshot with text.
All the other code in this commit is just the scaffolding to try to fix
this issue. It's all good stuff in itself. Basically stricter code
triggers for the different stages of page load: tab load, DOM ready,
page ready. I actually wonder if the TTY page loads feel snappier now?
closes#46
Only 'next-tab' is currently supported.
You will need to run Browsh with `--debug` then press the key
combination and watch the logs for something like;
`TTY sending: /stdin,{"char":"\u001c","key":28,"mod":2}`
That is the result of having `pressed CTRL+\`. Then add something
like the following to your config file:
```toml
[tty.keys]
next-tab = ["\u001c", "28", "2"]
```
touches #52
"If all you have is a 3kbps connection tethered" --> "If you only have a 3kbps internet connection"
"But traditional text-based browsers..." --> "However, traditional text-based browsers"
"lack JS support and all other modern HTML5 goodness." --> "lack JS and all other modern HTML5 support."
"few more hours life" --> "few more hours of life"
There's a bit of refactoring in order for the webextension to deal with
the new order of initialisation now that config is sent by the Golang
client.
Closes#83
Includes change of CLI args, many of been moved to the config file and
those that remain begin with `--` not `-` and may be worded differently.
Touches #37
This was caused by misunderstanding of the finer details of strings,
runes and slices. I just changed the input_box struct to use runes and
then followed the trail of type errors until input_boxes only ever used
strings to send their text outside themselves.
Closes#93
There was a bug where raw text pages would unusually truncated. It
seemed to coincide with the char dimensions being incorrectly
calculated. My only guess was that it was because of race condition on
lightweigh sites that didn't load Browsh's webextension code in time.
So for now it just seems better to hard code the char dimensions, which
should at least be more reliable than the bugs of dynamically
calculating them .
Changed "Why?" to "Why use Browsh?"
Removed avoidable phrases such as "that" and "and uses that"
Divided a run-on sentence by using a period
Switched "Firefox =>57" to "Firefox 57 (or higher)
Shortened the documentation sentence and link