Wykres commitów

91 Commity (82dd8dda4527c37046be7f701679cffc0ba972a9)

Autor SHA1 Wiadomość Data
Thomas Buckley-Houston 07ccc9d9d7
chore: Upgrade all node deps 2022-07-16 18:52:07 -04:00
Andres Lowrie 98b59929d9
default to https for donate (#325) 2020-06-18 09:39:18 +02:00
niu tech f62d7dcb18 Change font family, fix invalid CSS (fixes #70) (#253)
* Increase font size, fix invalid CSS (fixes #70)

* Revert to 15px, use Courier New font if available
2019-10-01 10:53:44 +02:00
Thomas Buckley-Houston 1d4723f3b0 injectCustomCSS() fix, don't error of no body 2019-06-19 13:29:09 +03:00
Thomas Buckley-Houston 759e8a125a HTTP server return <html> instead of just <body> 2019-06-19 13:22:38 +03:00
Thomas Buckley-Houston 95562aa129 HTTP server: fixes that were causing page hangs 2019-06-19 13:21:41 +03:00
Thomas Buckley-Houston d6b5951059 HTTP server: add experimental DOM-dump mode
Simply dumps the contents of the DOM
2019-06-19 09:03:20 +03:00
Thomas Buckley-Houston 931cc1ca38 Allow Firefox prefs to be set in config.toml 2019-06-18 17:17:01 +03:00
Thomas Buckley-Houston 2b97b29d91 HTTP server: fix for stale DOM dimensions 2019-06-18 13:41:23 +03:00
Thomas Buckley-Houston 31def7cc30 Config to set custom global CSS 2019-06-18 12:54:29 +03:00
Thomas Buckley-Houston d079f9a353 JS prettier fixes 2019-06-18 12:51:06 +03:00
Thomas Buckley-Houston f8b0e5592b Text rendering: fixes and improvements
Introduces a new option to disable the pixel comparison text visibility
detecting code. There are some situations in which it helps and some in
which it hinders. So for now it is disable by default and can be
enabled through the config file or my pressing F6 in the TTY client.

Also includes a couple of fixes to the HTTP server's text rendering.
2019-06-18 12:31:45 +03:00
Thomas Buckley-Houston 27826b34e2 Various improvements to integration tests
This has been a long time coming, but it's still not perfect. Basically
I'm trying to reset the entire environment as much as possible so that
each spec runs in a clean room. Mostly in this commit Firefox is being
killed and restarted for every spec, which has made a lot of
improvements.
2019-06-11 12:21:39 +03:00
BO41 582ac7224b optimise js 2018-09-22 21:30:26 +08:00
BO41 99a4000dc1 Refactors lots of JS `if`s (#169) 2018-08-04 20:51:09 +08:00
BO41 ad235b6c51 Use less verbose `if` statements (#166) 2018-08-04 19:55:37 +08:00
Thomas Buckley-Houston aefff58b43 Adds page-load timing end to `window.onload` event
I'd added this before, but for some reason it went missing.
2018-07-25 10:36:31 +08:00
Thomas Buckley-Houston 4ae545d514 JS formatting 2018-07-24 22:38:45 +08:00
Thomas Buckley-Houston 4fa867cafd Attempted fix for HTTP server's stuck requests
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.
2018-07-24 21:28:14 +08:00
Thomas Buckley-Houston 514260205c Page load and parsing durations in HTTP header 2018-07-24 15:54:45 +08:00
Thomas Buckley-Houston 2f713f40fc Ran linters to fix formatting 2018-07-24 13:30:51 +08:00
Thomas Buckley-Houston a8cff1bf1d Fixes 'no-text' bug in HTTP server's raw text
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
2018-07-21 23:04:09 +08:00
Thomas Buckley-Houston a9425988af JS and Go formatting 2018-07-19 14:07:39 +08:00
Thomas Buckley-Houston 618f192ca5 Adds header/footer to plain text HTTP responses 2018-07-19 13:53:25 +08:00
Thomas Buckley-Houston 6f7af4f8bc Adds to call to donate on HTML page footers 2018-07-19 13:37:14 +08:00
Thomas Buckley-Houston 8851ded7ea Adds Browsh version to HTML output 2018-07-19 13:36:53 +08:00
Thomas Buckley-Houston 73c8bd94f3 Made all obvious variables user-configurable
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
2018-07-18 15:55:35 +08:00
Thomas Buckley-Houston 24fcd9f562 Fix JS test after char size hardcoding 2018-07-16 18:22:37 +08:00
Thomas Buckley-Houston 38cf92b486 Prettier formatting fix 2018-07-16 18:08:04 +08:00
Thomas Buckley-Houston 5a25149fdf Only log char dimensions if they differ 2018-07-16 17:58:29 +08:00
Thomas Buckley-Houston b2988bfa1f Fix for incorrectly calculated char dimensions
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 .
2018-07-16 13:56:24 +08:00
Thomas Buckley-Houston d66d3e26a0 JS prettier formatting 2018-07-11 17:28:56 +08:00
Thomas Buckley-Houston 3c41974ce0 Increase sendRawText() wait hack to 400ms
I know this adds another 200ms to page load times, but it prevents pages
with a lot of text not rendering their text. Obviously better to just
fix the original bug.
2018-07-11 16:49:59 +08:00
Thomas Buckley-Houston 8d8168bfc6 First implementation of bg image for HTML service 2018-07-08 13:52:33 +08:00
Thomas Buckley-Houston 2ea4eb0f8c Better ENTER key UX
This came about from using Slack's web client.

Adding the input boxes padding to the DOM box coords makes the TTY
cursor more closely reflect the actual input box. Also using keyup/down
seems more universally applicable than merely kepress
2018-07-07 18:22:17 +08:00
Thomas Buckley-Houston 1a6fa690f5 Added donation link to HTML response pages 2018-07-06 13:43:53 +08:00
Thomas Buckley-Houston af1f47bc65 Version 1.1.4 2018-06-26 15:46:05 +08:00
Thomas Buckley-Houston 1bbe912994 Move start of raw text perf measurement 2018-06-26 13:42:07 +08:00
Thomas Buckley-Houston 642fd8348e Include original favicon in HTTP server responses 2018-06-26 13:28:27 +08:00
Thomas Buckley-Houston 5ddba85a0d Don't put any HTML in plain raw pages 2018-06-23 19:42:51 +08:00
Thomas Buckley-Houston d4cb55f91e Force monospace for raw text HTML pages 2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 2350000cfb Add time stamp to HTML raw text 2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 9ce338f531 Add limit to HTTP service's page size
Fixes #50
2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 61626b522a Fix for errant </a> tags appearing on HTTP server 2018-06-23 19:27:15 +08:00
Thomas Buckley-Houston b2f1315c11 More rigourous definition of mode
This prevents interactive mode frames and logs being sent during raw
mode.
2018-06-23 19:27:15 +08:00
Thomas Buckley-Houston 802a61204d Add 1 extra delayed big frames render at page load
Without getting into the whole CSS transitions problem, this is a quick
solution to ensuring that text both loads as quickly as possible and
also loads aftera delay fo 500ms when hopefully all page load
transitions have completed.

Touches #39
2018-06-23 19:27:15 +08:00
Thomas Buckley-Houston 3149db4bd3 Add anchor tags to HTTP Server output
This means you can now load the raw text in a browser and the resulting
page will have basic blue links that can be clicked on that will in turn
be loaded by the HTTP service.

A significant feature, so worthy of a minor version bump to;
v1.1.0
2018-06-17 21:26:44 +08:00
Thomas Buckley-Houston 1b42630b7f Text builder optimisations from @tobimensch 2018-06-15 11:15:01 +08:00
Thomas Buckley-Houston 3d39cf8b6d Fix maths for scroll-triggered big frame parsing
Big frames (ie plus and minus 6 or so frame heights) should only be sent
when plus or minus 6 frame heights have been scrolled.
2018-06-05 16:59:03 +08:00
Thomas Buckley-Houston b671a6c6b3 Drag and Drop mouse movement!
Not really sure why but `new MouseEvent` was always sending the coords
to the same place within an element, not matter where you clicked. Now
using initMouseEvent(), the click actually goes to the place on the
viewport where you clicked.
2018-06-05 15:51:27 +08:00