Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit f0ba72c

Browse files
committed
Merge pull request #2 from EFForg/master
Sync fork
2 parents 8fdf6e3 + c46c9ec commit f0ba72c

File tree

499 files changed

+7644
-4561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

499 files changed

+7644
-4561
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
# Config copied from
22
# http://www.theautomatedtester.co.uk/blog/2012/using-travis-ci-for-building-and-testing-firefox-addons.html
3-
# Use node_js because there are maybe more workers?
43
language: python
54
python:
65
- "2.7"
6+
cache: pip
77
addons:
8+
apt:
9+
packages:
10+
- libxml2-dev
11+
- python-dev
12+
- libcurl4-openssl-dev
13+
- python-lxml
814
firefox: "37.0"
915
virtualenv:
1016
system_site_packages: true
1117
install:
12-
- sudo apt-get -qq install libxml2-dev libxslt-dev python-dev libcurl4-openssl-dev python-lxml
1318
- pip install -r https-everywhere-checker/requirements.txt
1419
before_script:
1520
- sh -e /etc/init.d/xvfb start
1621
env:
1722
- DISPLAY=':99.0'
1823
script:
1924
- ./test.sh
25+
sudo: false
2026
notifications:
2127
email:
2228
recipients:

chromium/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@
4040
"<all_urls>"
4141
],
4242
"update_url": "https://www.eff.org/files/https-everywhere-chrome-updates.xml",
43-
"version": "2015.5.28"
43+
"version": "2015.7.13"
4444
}

https-everywhere-tests/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ implement them as automated tests:
2626
ruleset is disabled.
2727
- Click HTTP Everywhere icon, click ruleset again.
2828
- Reopen HTTPS Everywhere icon menu, verify ruleset shows up in green.
29-
- Click HTTPS Everywhere icon menu, click 'Enable / disable rules'. This will
30-
freeze up the browser for a few seconds. Verify it eventually opens up a
31-
dialog box listing all rules.
3229
- Right-click on a rule, click 'View XML source.' Verify it opens up a dialog
3330
box and shows the rule source.
3431
- Click HTTPS Everywhere icon menu, click 'Block all HTTP requests'. Verify icon

install-dev-dependencies.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@
33
# HTTPS Everywhere
44
set -o errexit -o xtrace
55
if type apt-get >/dev/null ; then
6+
BROWSERS="firefox chromium-browser"
7+
if [[ "$(lsb_release -is)" == "Debian" ]]; then
8+
# Iceweasel is the rebranded Firefox that Debian ships, and Chromium
9+
# takes the name of 'chromium' instead of 'chromium-browser' in
10+
# Debian 7 (wheezy) and later.
11+
BROWSERS="iceweasel chromium"
12+
fi
613
sudo apt-get install libxml2-dev libxml2-utils libxslt1-dev python-dev \
7-
firefox chromium-browser zip sqlite3 python-pip libcurl4-openssl-dev
14+
$BROWSERS zip sqlite3 python-pip libcurl4-openssl-dev
815
elif type brew >/dev/null ; then
916
brew list python &>/dev/null || brew install python
1017
brew install libxml2 gnu-sed

makexpi.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ APP_NAME=https-everywhere
1818
cd "`dirname $0`"
1919
RULESETS_SQLITE="$PWD/src/defaults/rulesets.sqlite"
2020
ANDROID_APP_ID=org.mozilla.firefox
21+
if [ "$1" == "--fast" ]; then
22+
FAST=true
23+
fi
2124

2225
[ -d pkg ] || mkdir pkg
2326

2427
# If the command line argument is a tag name, check that out and build it
25-
if [ -n "$1" ] && [ "$2" != "--no-recurse" ] && [ "$1" != "--fast" ] ; then
28+
if [ -n "$1" ] && [ "$2" != "--no-recurse" ] && [ -z "$FAST" ] ; then
2629
BRANCH=`git branch | head -n 1 | cut -d \ -f 2-`
2730
SUBDIR=checkout
2831
[ -d $SUBDIR ] || mkdir $SUBDIR
@@ -51,7 +54,7 @@ if [ -n "$1" ] && [ "$2" != "--no-recurse" ] && [ "$1" != "--fast" ] ; then
5154
exit 0
5255
fi
5356

54-
if [ "$1" != "--fast" -o ! -f "$RULESETS_SQLITE" ] ; then
57+
if [ -z "$FAST" -o ! -f "$RULESETS_SQLITE" ] ; then
5558
# This is an optimization to get the OS reading the rulesets into RAM ASAP;
5659
# it's useful on machines with slow disk seek times; doing several of these
5760
# at once allows the IO subsystem to seek more efficiently.
@@ -72,7 +75,7 @@ die() {
7275
exit 1
7376
}
7477

75-
if [ "$1" != "--fast" -a -z "$FAST" ] ; then
78+
if [ -z "$FAST" ] ; then
7679
if python2.7 ./utils/trivial-validate.py --quiet --db $RULESETS_SQLITE >&2
7780
then
7881
echo Validation of included rulesets completed. >&2
@@ -120,7 +123,7 @@ fi
120123

121124
# The name/version of the XPI we're building comes from src/install.rdf
122125
XPI_NAME="pkg/$APP_NAME-`grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3`"
123-
if [ "$1" ] && [ "$1" != "--fast" ] ; then
126+
if [ "$1" -a -z "$FAST" ] ; then
124127
XPI_NAME="$XPI_NAME"
125128
else
126129
# During development, generate packages named with the short hash of HEAD.

src/Changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Firefox 5.0.6 / Chrome-2015.7.13
2+
* Ruleset fixes
3+
* Move options from "Enable / Disable rules" into icon menu
4+
* EFF 25th birthday edition!
5+
16
Firefox 5.0.5 / Chrome-2015.5.28
27
* Ruleset fixes
38
* Fix ordering of locales to default to English again.

src/chrome/content/about.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const CC = Components.classes;
2+
3+
function window_opener(uri) {
4+
// we don't use window.open, because we need to work around TorButton's state control
5+
if(typeof gBrowser == "undefined"){
6+
var window = CC["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
7+
var browserWindow = window.getMostRecentWindow("navigator:browser").getBrowser();
8+
var newTab = browserWindow.addTab(uri, null, null);
9+
browserWindow.selectedTab = newTab;
10+
11+
}
12+
else
13+
gBrowser.selectedTab = gBrowser.addTab(uri);
14+
}

src/chrome/content/about.xul

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,31 @@
1414
align="center">
1515

1616
<script type="application/x-javascript"
17-
src="chrome://https-everywhere/content/preferences.js"/>
17+
src="chrome://https-everywhere/content/about.js"/>
1818
<vbox style="overflow:auto" flex="1">
1919
<label style="text-align:center; font-weight:bold; font-size:22px;">&https-everywhere.about.ext_name;</label>
2020
<label style="text-align:center; font-size:18px; margin-bottom:10px;">&https-everywhere.about.ext_description;</label>
2121

22+
<label style="font-weight:bold; margin-top:10px;">
23+
&https-everywhere.about.contribute;
24+
<label id="donate link"
25+
value="&https-everywhere.about.donate_tor;"
26+
style="color: blue; cursor:hand; text-decoration:underline; font-style:bold"
27+
onmouseover="event.target.style.cursor='pointer'"
28+
onmouseout="event.target.style.cursor='default'"
29+
onclick="window_opener('https://www.torproject.org/donate/donate.html.en')"/>
30+
&https-everywhere.about.or;
31+
<label id="donate link2"
32+
value="&https-everywhere.about.donate_eff;"
33+
style="color: blue; cursor:hand; text-decoration:underline; font-style:bold"
34+
onmouseover="event.target.style.cursor='pointer'"
35+
onmouseout="event.target.style.cursor='default'"
36+
onclick="window_opener('https://www.eff.org/donate')"/>
37+
</label>
38+
2239
<groupbox>
2340
<caption label="&https-everywhere.about.version;" />
24-
<label>5.0.5</label>
41+
<label>5.0.6</label>
2542
</groupbox>
2643

2744
<groupbox>
@@ -51,22 +68,5 @@
5168
from NoScript, by Giorgio Maone and others. We are grateful for their
5269
excellent work!</label>
5370
</groupbox>
54-
55-
<label style="font-weight:bold; margin-top:10px;">
56-
&https-everywhere.about.contribute;
57-
<label id="donate link"
58-
value="&https-everywhere.about.donate_tor;"
59-
style="color: blue; cursor:hand; text-decoration:underline; font-style:bold"
60-
onmouseover="event.target.style.cursor='pointer'"
61-
onmouseout="event.target.style.cursor='default'"
62-
onclick="window_opener('https://www.torproject.org/donate/donate.html.en')"/>
63-
&https-everywhere.about.or;
64-
<label id="donate link2"
65-
value="&https-everywhere.about.donate_eff;"
66-
style="color: blue; cursor:hand; text-decoration:underline; font-style:bold"
67-
onmouseover="event.target.style.cursor='pointer'"
68-
onmouseout="event.target.style.cursor='default'"
69-
onclick="window_opener('https://www.eff.org/donate')"/>
70-
</label>
7171
</vbox>
7272
</dialog>

src/chrome/content/code/ApplicableList.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,21 @@ ApplicableList.prototype = {
9898
var text = strings.getString("https-everywhere.menu.globalDisable");
9999
if(!https_everywhere.prefs.getBoolPref("globalEnabled"))
100100
text = strings.getString("https-everywhere.menu.globalEnable");
101-
101+
102102
enableLabel.setAttribute('label', text);
103-
enableLabel.setAttribute('command', 'https-everywhere-menuitem-globalEnableToggle');
103+
enableLabel.setAttribute('command', 'https-everywhere-menuitem-globalEnableToggle');
104104
this.prepend_child(enableLabel);
105-
105+
106106
// add the label at the top
107107
var any_rules = false;
108108
for(var x in this.all) {
109109
any_rules = true; // how did JavaScript get this ugly?
110110
break;
111111
}
112+
// This label just describes the fact that the items underneath it enable
113+
// and disable rules.
112114
var label = document.createElement('menuitem');
113115
label.setAttribute('label', strings.getString('https-everywhere.menu.enableDisable'));
114-
label.setAttribute('command', 'https-everywhere-menuitem-preferences');
115116
var label2 = false;
116117
if (!any_rules) {
117118
label2 = document.createElement('menuitem');

0 commit comments

Comments
 (0)