Commit graph

319 commits

Author SHA1 Message Date
Cecylia Bocovich
93d3564109 A few minor fixes to website
- cut down on size of bootstrap.css file
- remove unecessary styles
- fixed typo in javascript comment
2019-10-16 12:32:45 -04:00
Cecylia Bocovich
ab96817381 Added a language switcher for snowflake.tp.o
Also modified the styling of the page to match the main tp.o page a bit
more
2019-10-16 12:32:45 -04:00
Cecylia Bocovich
f6517f60ce Hook up localized messages.json to website
Right now we use the navigator language to determine localization and
replace the website contents with translated strings.
2019-10-16 12:32:45 -04:00
Cecylia Bocovich
9140c7648c Switched to absolute paths for resources
This will make it easier to have translated copies of the site in
subdirectories
2019-10-16 12:32:45 -04:00
Cecylia Bocovich
7fe4e2910c Translate snowflake@tp.o website
Switched to using messages.json for translation strings for
snowflake@tp.o
2019-10-16 12:32:45 -04:00
Cecylia Bocovich
d064e54db9 bump version to 0.0.12 2019-10-16 10:30:20 -04:00
Cecylia Bocovich
b9138d0c7e Make sure we close peer connections in proxy
Not closing peer connections was causing UDP sockets to remain open
indefinitely (as reported in ticket #31285).
2019-10-16 10:26:51 -04:00
Cecylia Bocovich
f74da6e0fc Update try catch blocks to revert changes on error
A failure to set the git tag returns and undoes the changes done
previously
2019-10-16 10:23:54 -04:00
Cecylia Bocovich
6e6e52fd8c Added packaging script for webextension
Added a new script to package the webextension. This will automatically
build and zip the source code and the webextension for upload. It take a
version as an argument and then checks the version in the manifest, and
locally commits a version bump.
2019-10-16 10:23:54 -04:00
Arlo Breault
d8d3170af8 Regenerate the ico files to reduce size
With,
convert -background transparent toolbar-off.svg -define icon:auto-resize=32 toolbar-off.ico
2019-10-11 13:18:51 -04:00
Arlo Breault
faf02d86a1 Update favicon with badge state on embed.html
.ico files were created with,
convert -density 256x256 -background transparent toolbar-on.svg -define icon:auto-resize -colors 256 toolbar-on.ico

Trac: 31537
2019-10-11 13:18:51 -04:00
David Fifield
5732f1a630 Add --chown=:snowflake to rsync commands.
Thanks cohosh for helping debug this. Uploaded files need correct group
ownership.
2019-10-11 10:37:06 -06:00
Cecylia Bocovich
61d8eb5ef0 bump version to 0.0.11 2019-10-11 10:40:56 -04:00
Cecylia Bocovich
9e22af90c1 Updated webextension translations 2019-10-04 13:52:07 -04:00
Arlo Breault
36eb07a6fc Use a static label for the button
Trac: 31685
2019-10-01 14:27:19 -04:00
Arlo Breault
a5071ec1d6 Add a favicon
Trac: 31537
2019-09-30 19:18:52 -04:00
Arlo Breault
8d81270a9f Add bridge probe to badge 2019-09-30 18:42:57 -04:00
Arlo Breault
d4aa9ad2b3 Reorder enable checks
First check that it is enabled before doing feature testing.

This will be useful in the badge so that probing only happens if it is
enabled.
2019-09-30 18:42:57 -04:00
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