Commit graph

251 commits

Author SHA1 Message Date
Arlo Breault
aa107862c5 Move probe to WS class for reuse in the badge 2019-09-30 18:42:57 -04:00
Arlo Breault
685c3bd262 Disable the webext if the bridge is unreachable 2019-09-30 18:42:57 -04:00
Arlo Breault
19bc6d8858 Move missingFeature to initToggle in webext 2019-09-30 18:42:57 -04:00
Arlo Breault
1b14810d34 Enforce consistent indentation in js 2019-08-27 18:19:51 -04:00
emma peel
ea442141db remove exclamation mark. ref https://grammar.yourdictionary.com/punctuation/when/when-to-use-exclamation-marks.html 2019-08-26 15:19:20 -04:00
Arlo Breault
131cf4f8ea Add branch to .gitmodule + bump to bbf11bb
This allows you to run `git submodule update --remote` to bump to the
latest commit on that branch.
2019-08-26 15:14:17 -04:00
Arlo Breault
9faf8293e6 Bump proxy/translation to HEAD of snowflakeaddon-messages.json_completed 2019-08-26 15:14:17 -04:00
Arlo Breault
1c550599b8 Automate generating the list of available languages for the badge
Note that getMessage in the badge depends on having a complete set of
translations, unlike the webextension, which will fallback to the
default for a string.
2019-08-26 15:14:17 -04:00
Arlo Breault
1e33ae830f Get badge locale from navigator.language 2019-08-26 15:14:17 -04:00
Arlo Breault
9c20ab3984 Copy completed translations over when building 2019-08-26 15:14:17 -04:00
Arlo Breault
a0dd3d9edc Add translation submodule
At the head of the snowflakeaddon-messages.json_completed branch
2019-08-26 15:14:17 -04:00
Cecylia Bocovich
4b6871a24e Version bump for bug #31385 2019-08-26 09:16:47 -04:00
Cecylia Bocovich
16a1b69823 Added check for active pair in onopen
Because the timeout makes the pair inactive, we should check for this
state in onopen before connecting to the client. Updated tests to set
the proxy pair to active before testing onopen. Also removed a
redundant statement.
2019-08-26 09:15:38 -04:00
Cecylia Bocovich
8a5941daab Fix to check running status before closing proxy
This fixes a bug reported in #31385. There was an error with the proxy
deadlock fix in #31100 where we close proxies regardless of connection
status.
2019-08-26 09:15:38 -04:00
David Fifield
6be7bedd06 Add --chmod ug=rw,D+x --perms to rsync commands.
This is an attempt to solve mixed-ownership permission issues.
https://bugs.torproject.org/31496
2019-08-23 22:51:27 -06:00
David Fifield
1d6a98a40e Limit the maximum horizontal content width to 55rem. 2019-08-23 22:44:36 -06:00
David Fifield
dff07d6672 Use less side padding on small screens. 2019-08-23 22:43:10 -06:00
David Fifield
49f4a710f8 Use more semantic HTML. 2019-08-23 22:43:10 -06:00
David Fifield
1063ef7b1d Fix certain attributes to be pixel counts, not CSS dimensions.
Found these using https://validator.w3.org/.
2019-08-23 21:56:39 -06:00
David Fifield
3bcd60ad10 Update the iframe embed height to match the live example.
The live example changed from "200px" to "240px" in
4e5a50f2b5.
2019-08-23 21:56:23 -06:00
David Fifield
73174b4039 Add ids to more elements in static/index.html. 2019-08-23 18:31:10 -06:00
David Fifield
0ef7c6f1fa Bug 31453: use only SVG for the status images. 2019-08-19 12:44:30 -06:00
David Fifield
f9173f61a2 Make a dark-mode version of the arrowhead icon.
The former icon used fill="context-fill", which I believe doesn't work
except in Mozilla's own extensions. So I changed that one to
fill="black" and made a new one with fill="white".
2019-08-19 12:24:10 -06:00
David Fifield
251b6a26fa Change the "running" color to #68B030.
Not so light against a white background.
https://bugs.torproject.org/31170#comment:13
2019-08-19 12:24:10 -06:00
David Fifield
6ab50e32b9 Toolbar icons that work in both light and dark modes.
https://bugs.torproject.org/31170#comment:8

I chose these icons for the "on" and "off" icons:
toolbar_icon_purple.svg → toolbar-on.svg
toolbar_icon_grey.svg → toolbar-off.svg

I then made toolbar-running.svg by copying toolbar-off.svg and changing
the stroke and fill from #4A4A4F to #40E0D0.
2019-08-19 12:24:09 -06:00
David Fifield
36815bd57b Popup CSS for dark mode.
In Firefox, this requires version 67 for support for
prefers-color-scheme media queries.
https://hacks.mozilla.org/2019/05/firefox-67-dark-mode-css-webrender/
To force Firefox into dark mode, set ui.systemUsesDarkTheme=1 (and
optionally browser.in-content.dark-mode=true, to put pages such as
about:addons into dark mode as well) in about:config. You can check if
it's working at https://bugzilla.mozilla.org/, which has its own
dark-mode styling. Note that this kind of dark mode is *independent* of
the "Dark" theme that can be selected in about:addons.

Chrome requires version 76 for prefers-color-scheme. You can force it by
running with the --force-dark-mode command-line option.
2019-08-19 12:24:09 -06:00
David Fifield
1e6dd4d86f Redo the status-running icon to match the others.
This one was missing from the redesigned icons. I made it by making a
copy of status-on.svg and changing the fill from #8000D7 to #40E0D0.

I didn't make a separate dark-mode version of the icon.
2019-08-19 12:24:09 -06:00
David Fifield
7e2936dcec Dark-mode images from Antonela.
https://bugs.torproject.org/31170#comment:3

Also revises the light-mode images.
2019-08-19 12:24:09 -06:00
Arlo Breault
4e5a50f2b5 Start localization
Trac 30310
2019-08-15 17:15:37 -04:00
Cecylia Bocovich
f94ef87c46 Increase webextension poll period
Raise the webextension poll period from 5 to 20 seconds (bug 31200).
2019-08-12 13:14:25 -04:00
Cecylia Bocovich
0b55fd307a Version bump for webextension 2019-08-08 11:11:56 -04:00
Cecylia Bocovich
e77baabdcf Add a timeout to check if datachannel opened
This is similar to the deadlock bug in the proxy-go instances. If the
proxy-pair sends an answer to the broker, it previously assumed that the
datachannel would be opened and the pair reused only once the
datachannel closed. However, sometimes the datachannel never opens due
to ICE errors or a misbehaving/buggy client causing the proxy to
infinitely loop and the proxy-pair to remain active.

This commit reuses the pair.running attribute to indicate whether or not
the datachannel has been opened and sets a timeout to close the
proxy-pair if it has not been opened by that time.
2019-08-08 10:36:28 -04:00
Cecylia Bocovich
6cc944f2b4 Reuse proxypair if sendAnswer fails
Make sure to set proxypair.active to false if createAnswer or
setLocalDescription fails. This should prevent one edge case the results
in an infinite loop described in ticket #31100.
2019-08-08 10:36:28 -04:00
David Fifield
990047b2f5 Control statusimg using CSS, rather than setting an img src. 2019-07-31 19:09:46 -06:00
David Fifield
8f885c7557 Set an "error" class instead of hardcoding a text color. 2019-07-31 19:09:46 -06:00
David Fifield
8a56baa8e1 Identify popup elements by id. 2019-07-31 19:09:44 -06:00
Arlo Breault
e6f7633961 Remove mentions of snowflake.html
It was removed in e60f228 and aa27c05
2019-07-31 18:14:00 -04:00
Arlo Breault
b324d9d42f Move icons/ to assets/
There's a default alias for icons/ in apache,
https://www.electrictoolbox.com/apache-icons-directory/
2019-07-31 17:59:48 -04:00
Arlo Breault
5321223240 Use execSync in make.js
695554c highlighted the race here.
2019-07-31 16:43:56 -04:00
Arlo Breault
aa27c0556c Redirect removed snowflake.html 2019-07-31 15:49:21 -04:00
Arlo Breault
8de6e26c59 Remove Util.mightBeTBB
Trac 31222
2019-07-27 12:01:03 -04:00
Arlo Breault
5d26f76ba1 Brace expansion is a bashism 2019-07-27 12:01:03 -04:00
Arlo Breault
03512bfa29 Move more UI code to use specific sites 2019-07-27 12:01:03 -04:00
Arlo Breault
a164d61f16 Remove tests referring to BadgeUI
Since that's been overhauled.  The whole ui.spec.js file probably needs
redoing.
2019-07-27 12:01:03 -04:00
Arlo Breault
0f33546fec Clean up some linting errors 2019-07-27 12:01:03 -04:00
Arlo Breault
e60f22833a Reimagine the badge
Trac 27385
2019-07-27 12:01:03 -04:00
David Fifield
0bded511b9 Add a "Deploying" section to proxy/README.md. 2019-07-27 09:53:09 -06:00
David Fifield
695554cbc5 Make "npm run build" include .htaccess.
Formerly it was copying static/*, and the wildcard skipped the dotfile.
2019-07-27 09:42:12 -06:00
David Fifield
905f8b78c1 bamsoftware.com -> freehaven.net in proxy/README.md.
https://bugs.torproject.org/31250
2019-07-27 09:31:16 -06:00
Cecylia Bocovich
299c12b2e9 Version bump to fix issue with addon update 2019-07-26 10:45:50 -04:00