Commit graph

98 commits

Author SHA1 Message Date
Thomas Buckley-Houston 65936913cb Don't use curl's --fail in setting up Browsh
Seems to fail every time
2018-07-10 10:44:34 +08:00
Thomas Buckley-Houston 74fd11ab7b Correct link on text.brow.sh home page 2018-07-10 09:11:06 +08:00
Thomas Buckley-Houston c457210c72 Refactor disallowed domains in HTTP service 2018-07-09 19:22:51 +08:00
Thomas Buckley-Houston 90078ff6c0 Add --fail and set -e when setting up Browsh
As per @zutto's suggestion in #62

This will at least notify us when something goes wrong during a Docker
build.
2018-07-09 19:21:25 +08:00
Thomas Buckley-Houston 29132f3695 Better attempt to fix Google phishing warnings 2018-07-09 13:51:58 +08:00
Thomas Buckley-Houston 384688302e Quick fix to stop Chrome detecting phishing
Apparently Google isn't happy about
https://html.brow.sh/mail.google.com URLs.
2018-07-09 13:06:50 +08:00
Thomas Buckley-Houston ba373e9815 Change 'texttop' refs to 'browsh' 2018-07-08 17:07:10 +08:00
Thomas Buckley-Houston 160a19ece8 Add arg for HTTP server bind address
Eg; `browsh -http-server-bind 127.0.0.1`

Fixes #57
2018-07-08 15:41:13 +08:00
Thomas Buckley-Houston 26fa4cb3de Use www.brow.sh's HTML service welcome page
It's nice to see the big Browsh logo rather just some boring plain text
2018-07-08 15:33:08 +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 7f8893fe14 Add logo to TTY startup. README updates 2018-07-06 13:17:28 +08:00
Thomas Buckley-Houston 752f34ddb3 Redirect HTTP to HTTPS 2018-06-27 17:10:48 +08:00
Thomas Buckley-Houston 16f1917ed8 Basic application-level HTTP rate limiting
Here set to 10 requests per minute. Note that the current implementation
doesn't use a shared store across instances, so in effect clients can
request on average instances-count * 10 requests per minute.
2018-06-26 15:21:10 +08:00
Thomas Buckley-Houston c0c68842f0 Added gzip compression to HTTP server 2018-06-26 13:57:52 +08:00
Thomas Buckley-Houston 2e1de9dab1 Add 10min public cache to HTTP server 2018-06-25 22:06:29 +08:00
Thomas Buckley-Houston 4f637ccddc F1 key to open help tab
Closes #38
2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 3f6211c8a4 Added robots.txt to ignore everything but / 2018-06-23 19:27:55 +08:00
Thomas Buckley-Houston 70d3f45f60 Extra loggina and README updates 2018-06-23 19:27:15 +08:00
Thomas Buckley-Houston ea53e6b467 Return help message for / request on HTTP service 2018-06-18 20:00:29 +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 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 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 fe2ac579a4 Make releases default to published and official 2018-06-12 20:54:10 +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 133e176646 Don't compress *any* freebsd binaries
... including ARM ones
2018-06-12 20:37:33 +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 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 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 12c8a58868 Prevent crash when keys pressed during boot screen 2018-06-05 16:11:46 +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 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 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
Thomas Buckley-Houston 0fc39a51e6 HTTP Server service: fetches URL, returns raw text
Using the `-http-server` argument will now start Browsh in HTTP Server
mode. It will accept request like this:

  `curl brow.sh/http://news.ycombinator.com`

This will return a plain text version of the Hacker News front page,
with a width of 100 characters, with each line separated by a line
break.
2018-05-27 20:45:43 +08:00
Thomas Buckley-Houston 4b84d52ae1 Backspace goes back in history
Also:
  * Use webextension to navigate URLs instead of the DOM. This means
    that crashed pages can still be navigated away from.
  * An attempt to implement mouse dragndrop, but it doesn't work :(
2018-05-25 18:48:57 +08:00
Thomas Buckley-Houston f2d9d44268 Minor: fix unit and integration tests
Unit tests needed tab objects to be created.

Integration tests needed more max time for start up and to make sure
that the final tab doesn't get closed.
2018-05-25 15:43:22 +08:00
Thomas Buckley-Houston 938d51b692 Tabs! As we all know and love
Adding, cycling, deleting. The width of the tab handle is currently
fixed to 20. And if there are more tabs than can fit in the tab bar then
the extra ones just dissapear off to the right, but they can still be
cycled to with CTRL-Tab.

The marks the end of feature development in preperation for a version
1 release.
2018-05-24 18:45:07 +08:00