Commit graph

155 commits

Author SHA1 Message Date
Thomas Buckley-Houston 4b18c55d5c Ensure webext-rewrite branch is used to push tags
...this is during a release
2018-06-18 19:16:56 +08:00
Thomas Buckley-Houston f0467b61c5 Don't log to STDOUT during HTTP server tests 2018-06-18 19:06:05 +08:00
Thomas Buckley-Houston b4e48ae248 Version bump to v1.1.1 2018-06-18 18:59:32 +08:00
Thomas Buckley-Houston ffbb182678 Log to STDOUT if running as HTTP service 2018-06-18 18:04:15 +08:00
Thomas Buckley-Houston c70083958f HTTP server: Use whole URI, including query 2018-06-17 21:40:16 +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 92de166b77 Ensure correct branch checked out to tag release 2018-06-14 05:30:19 +08:00
Thomas Buckley-Houston c9df161eb6 Don't UPX compress OSX binaries
The current versions of UPX cause an instant crash of the Browsh binary
on OSX :/

Version 1.0.13
2018-06-13 19:37:26 +08:00
Thomas Buckley-Houston d3d194bf6b README updated 2018-06-12 21:01:31 +08:00
Thomas Buckley-Houston fc40abdf03 README: correct link to releases 2018-06-12 20:55:43 +08:00
Thomas Buckley-Houston fe2ac579a4 Make releases default to published and official 2018-06-12 20:54:10 +08:00
Thomas Buckley-Houston f894057172 Version 1.0.12 2018-06-12 20:47:54 +08:00
Thomas Buckley-Houston 375a7a16b1 Didn't use glob for freebsd UPX exclusion 2018-06-12 20:47:20 +08:00
Thomas Buckley-Houston 73008cf42c README update 2018-06-12 20:39:34 +08:00
Thomas Buckley-Houston e24ea50dd7 Version 1.0.11 2018-06-12 20:38:30 +08:00
Thomas Buckley-Houston 133e176646 Don't compress *any* freebsd binaries
... including ARM ones
2018-06-12 20:37:33 +08:00
Thomas Buckley-Houston 9a1d0458b4 README update 2018-06-12 20:32:12 +08:00
Thomas Buckley-Houston cf35a065bf Version 1.0.10 2018-06-12 20:30:40 +08:00
Thomas Buckley-Houston c415547c5b Added ARM architecture builds
Touches #12
2018-06-12 19:42:00 +08:00
Thomas Buckley-Houston a8ea195087 Marionette startup: catch error rather than wait
It appears that Firefox doesn't always log its Marionette startup, so
instead this commit catches the network error when Marionette is yet to
start and just retries until Marionette is ready.
2018-06-12 19:38:39 +08:00
Thomas Buckley-Houston 2577ea896b Fixes to get the Docker image building again
Firstly Firefox 60 now throws an error if its run as root inside a
user's home path. Which is great because that revelead my naivety about
using `RUN su user` in the Dockerfile. So now Firefox is running as a
non-root user inside Docker which is what was always best.

Also it turns out that the crude 3 second wait at startup hoping that
Firefox's Marionette had started listening, wasn't good enough. So now
we're actually listening for a log message to know when it's started
now.

Finally make all startup methods use a the post-webext connection state
to send the startup URL to the browser, the other methods just seemed to
flakey.

Includes version bump to 1.0.9
2018-06-12 15:40:49 +08:00
Thomas Buckley-Houston c13e8d26f6 Use absolute path to webextension.go asset
Bump to version 1.0.8
2018-06-11 16:28:00 +08:00
Thomas Buckley-Houston 47bcbbc0a6 Version 1.0.5
Adjust path in .goreleaser.yml

Boot Firefox before any tests to get any 'first launch' behaviour out of
the way.

Remove pacman build as we're using nfpm instead of fpm now.
2018-06-11 14:11:45 +08:00
Thomas Buckley-Houston 0109fa206e Move .goreleaser.yml file 2018-06-10 22:47:49 +08:00
Thomas Buckley-Houston 05c2d9f4f3 Version 1.0.2
Update Firefox version dependency to 60.0
2018-06-10 22:30:44 +08:00
Thomas Buckley-Houston 2f72159670 Goreleaser: replace fpm with nfpm 2018-06-10 21:01:25 +08:00
Thomas Buckley-Houston 14796c0d93 Updates for Goreleaser
Update Golang to 0.10

Use `curl -sL http://git.io/goreleaser | bash` instead of `go get`
2018-06-10 20:33:41 +08:00
Thomas Buckley-Houston 98fa8014b9 Added Firefox paths for Windows and OSX
Also updated Gopkg dep versions.

And version bump to 1.0.0pre1!
2018-06-10 20:16:28 +08:00
Thomas Buckley-Houston 7d3620e12d HTTP Service: don't delete tab if last remaining
Previously we were using the tab's ID to decide if it was the root tab
(that if deleted would close the browser). However our ol' "friend" the
Firefox Privacy tab can sometimes take the TAB ID=1 hotspot, so now we
just have to call out to the browser to ask it how many tabs are
currently loaded, this is more reliable.
2018-06-05 18:50:10 +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 d6406ac734 Don't forward keypresses when URL box is active
This fixes a bug where pressing return after entering a new URL would
forward the ENTER key to the DOM and sometimes trigger the focussed
result in a Google search.
2018-06-05 16:30:07 +08:00
Thomas Buckley-Houston ad64b4f0a3 Remove all text-decoration underlines
These don't dissapear when using the blank font, so they can sometimes
cause a little bit of blur behind link text.
2018-06-05 16:16:57 +08:00
Thomas Buckley-Houston ea841fc672 Show all tab HTTP requests as a 'loading' status
Suddenly found out about webextensions `webRequests` API, where you can
intercept all HTTP requests. Previously you only got status updates when
the current page fired a `window.onunload` event, which is often a long
time after the initial request to new URL is made.
2018-06-05 16:14:52 +08:00
Thomas Buckley-Houston 12c8a58868 Prevent crash when keys pressed during boot screen 2018-06-05 16:11:46 +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
Thomas Buckley-Houston 707a433385 Better rules for finding input boxes
Google maps doesn't use a [type=text], or any kind of type attribute for
its search box. Plus it also has a [aria-hidden=true] input box that
Browsh was detecting and covering the actual active search box.
2018-06-05 15:25:57 +08:00
Thomas Buckley-Houston 8d958b0256 Readded the browser resize height magic number
This fixes a bug where the bottom of web pages wouldn't get parsed.

And also another bug where mouse clicks at the bottom of a page
wouldn't render.
2018-06-05 15:01:52 +08:00
Thomas Buckley-Houston e937f81a60 Added shortcut to toggle a mobile user agent 2018-06-05 14:40:03 +08:00
Thomas Buckley-Houston 5b575110b1 Include role="textbox" elements as an input boxes
This just about allows you to use Gmail
2018-06-04 21:29:43 +08:00
Thomas Buckley-Houston 07fd062510 Stackoverflow.com-related fixes
Stackoverflow surfaced a few bugs;

1. For some unknown reason it measures the em value of a single
character as having something like 10,000 pixels width. So for now I'm
just hardcoding the standard measurement of 9x15 for unreasonably large
widths.

2. Its cookie banner used `position: fixed !important`, so needed to
update the sticky fix code in case other sites do the same.

3. The cookie banner with the aplied sticky fix meant that the div just
sat staticlly in the middle of the DOM obscuring other text. So I
started a list of site-specific CSS specifics.
2018-06-04 21:01:46 +08:00
Thomas Buckley-Houston eb1176b8c3 Fixes for text that clobbers other text
During the text builder process its possible that a character tries to
fit onto a TTY cell that already has a character. There are multiple
reasons for this, the main one being hidden text. This commit changes
the method for deciding the priority of character to using the
`elementFromPoint(x, y)` method.

This commit also includes a fix to re-parse all text when there's a
mousedown event.
2018-06-04 20:03:59 +08:00
Thomas Buckley-Houston e2d39ba56c Prevent sticky elements from being sticky
Sticky elements are, for example, those headers that follow you
down the page as you scroll. They are annoying even in desktop
browsers, however because of the lower frame rate of Browsh, sticky
elements stutter down the page, so it's even more annoying. Not to
mention the screen real estate that sticky elements take up, which
is even more noticeable on a small TTY screen like Browsh's.
2018-06-04 17:52:00 +08:00
Thomas Buckley-Houston 7232ac120f Bug fix: improved line formatting
There was a long standing problem where random gaps would appear
between lines. The fix was to change a magic number that adds an extra
few pixels to the reported height of the 'em' character dimensions.
Unfortunately I don't know what this magic number actually does. It
might represent the distance between lines?
2018-06-04 17:02:15 +08:00
Thomas Buckley-Houston 72c74f1905 Fixes bug in HTTP Service rendering
I think with the recent change to the method of hiding text by using a
dedicated blank font, the initial page load and parsing (upon which the
HTTP Service very much depends), browser window resizes were causing a
delay in the time taken for text to be properly parsed, resulting in
mostly empty raw text pages.

The fix was to ensure that the BlankMono.ttf font was loaded with the
initial page load, by using the webextensions injected style.css file.
2018-06-04 15:51:47 +08:00
Thomas Buckley-Houston cc23f0ab3e Increased big text frames to size 6
That's that frames 6 times as big as the TTY are passed at once. This
lessens the likelihood of catching a glimpse of unparsed webpage as
you're scrolling down quickly.
2018-06-03 20:06:33 +08:00
Thomas Buckley-Houston 02bc0aad93 Hide/Show text using seperate font
Previously we were using CSS to make the text's colour transparent.
However that proved to cause a lot of problems with pre-existing
transition animations in the host webpage. There didn't seem to be
anyway to disable the transition time for text transitioning to
transparent, without also disabling all transitions.

Also added censorship to password input boxes.
2018-06-03 19:54:38 +08:00
Thomas Buckley-Houston c8d5d09de7 First implementation of text selection
This is so you can immediately clear the URL bar upon toggling. Which
saves you holding down the backspace key if you want to ente a new URL.

Only for input boxes. And SHIFT-ARROW isn't implemented.
2018-06-03 13:12:31 +08:00
Thomas Buckley-Houston 55c70d9e5e Multiline text input boxes
No doubt a lot of this code is reinventing the wheel, after all this is
basically now a simple text editor. I'm sure there'll be a few bugs to
iron out.
2018-06-02 18:47:37 +08:00
Thomas Buckley-Houston b78abbf26f Overflow scrolling for single line input boxes
Such a basic thing, that we take it for granted. But it's actually a bit
tricky to implement.
2018-05-28 22:03:33 +08:00