Commit graph

121 commits

Author SHA1 Message Date
Thomas Buckley-Houston 4b2ce6abbc Gofmt formatting 2018-07-17 10:10:08 +08:00
Thomas Buckley-Houston f05a21a339 Exclude windows files when running unit tests 2018-07-16 23:08:24 +08:00
Thomas Buckley-Houston 1017e8d000 Possible fix for windows path and crash issues
Touches #111 #117 #130
2018-07-16 22:29:10 +08:00
Thomas Buckley-Houston 527df8bb16 Fix for non-ASCII chars generating extra chars
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
2018-07-16 17:58:53 +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 79bd148a60 Add OpenBSD build
Touches #126 /cc @vext01
2018-07-14 21:25:29 +08:00
Thomas Buckley-Houston effa2acc77 Add caveats to Homebrew Tap about FF 57+ dep
Touches #65
2018-07-13 17:28:24 +08:00
Thomas Buckley-Houston 6471b6f42c Remove Firefox as a dep in Brew Tap recipe
Touches #65
2018-07-12 04:44:27 +08:00
Thomas Buckley-Houston 1bfb10f022 Don't UPX compress linux_arm64 binary 2018-07-11 18:04:12 +08:00
Thomas Buckley-Houston 21bd850f50 Missing - in goreleaser :/
Bump to v1.3.1
2018-07-11 17:55:35 +08:00
Thomas Buckley-Houston 5263897fb1 Add 386 and arm64 builds 2018-07-11 17:33:58 +08:00
Thomas Buckley-Houston 2fc0b5cde3 Formatted all Go code
Closes #97
2018-07-11 17:00:06 +08:00
Thomas Buckley-Houston be098c0673 Redirect HTML service requests for favicon.ico
... to a real favicon
2018-07-11 16:46:33 +08:00
Thomas Buckley-Houston 85affab04d Collapse recursive URLs to the HTML service
Eg; https://html.brow.sh/https://html.brow.sh/google.com
jsut becomes google.com
2018-07-11 16:39:35 +08:00
Thomas Buckley-Houston 3d0c224a6b Error if Firefox version is older than 57 2018-07-11 15:43:47 +08:00
Thomas Buckley-Houston 24c49213e2 Use firefox | firefox-esr as OR dep for .deb
Touches #103

Though note that currently Debian Stretch's Firefox version is 52,
which is not new enough for Browsh.
2018-07-11 15:20:33 +08:00
Thomas Buckley-Houston b8d031e498 Goreleaser: format default zip, override to binary
This is the wrong way round, it should default to binary as that's what
most of the OS's are and just set the zip override for `darwin`.

Watch this issue for updates:
https://github.com/goreleaser/goreleaser/issues/720
2018-07-11 15:05:37 +08:00
Thomas Buckley-Houston 3cc5485c2f Merge branch 'master' of github.com:browsh-org/browsh 2018-07-11 11:55:58 +08:00
Thomas Buckley-Houston b4c9f2d4e6 Added Homebrew Tap recipe 2018-07-11 11:55:19 +08:00
Thomas Buckley-Houston 3ee9b16ea8 Prevent mouse interaction crashing app
Possibly helps everyone in #63, #73 and #94

Whether it solves the issue or not, this definitely fixes a bug.
`CurrentTab` doesn't refer to anything until the first frame is received
from the webextension, yet tthe `handleMouseEvent` function can be
triggered long before that.
2018-07-11 11:30:22 +08:00
traBpUkciP a3b8c05b60 Use Backticks to Wrap String With Slashes
Oops. Quick fix.
2018-07-11 06:22:49 +07:00
traBpUkciP 78b021f822 Add Support for 64 bit Firefox Installations (#87)
Should fix up #87 and all the other related issues. Haven't wrote any golang for a year but I think it was a pretty simple fix so I took it on; however ff someone wouldn't mind giving it a second set of eyes that would be awesome. I'm stoked to try the app out, it's looks so cool :P

Cheers
2018-07-11 06:22:49 +07:00
Emiel Wiedijk d79b8810dc Check for $GOPATH
The shell script in interfacer/contrib/setup_go.sh expands the $GOPATH
variable to download a script to $GOPATH/bin. However, if $GOPATH is not
set, that expands to /bin. If the script is run with root privileges
(accidentally), this will download a "strange" executable to /bin, which
is supposed to be for system executables. If it is run without root
privileges, it gives an (unclear) error about permissions. This commit checks
if $GOPATH exists. If it $GOPATH does not exist, it exits with error code 1.
2018-07-11 06:21:23 +07:00
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