Skip to content

Commit 47a5006

Browse files
committed
Only show "Add a rule" on HTTPS sites.
Also fix makecrx.sh
1 parent b9c5f54 commit 47a5006

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

chromium/popup.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,9 @@ footer {
9393
margin-top: 16px;
9494
padding: 8px 0;
9595
}
96+
97+
/* By default the "Add a rule" link is hidden. It's shown on HTTPS sites for
98+
* which there is no rule. */
99+
#add-rule-link {
100+
display: none
101+
}

chromium/popup.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ function gotTab(tab) {
7878
listDiv.style.position = "static";
7979
listDiv.style.visibility = "visible";
8080
}
81+
// Only show the "Add a rule" link if we're on an HTTPS page
82+
if (/^https:/.test(tab.url)) {
83+
show(e("add-rule-link"));
84+
}
8185
}
8286

8387
document.addEventListener("DOMContentLoaded", function () {

makecrx.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# "dummy-chromium.pem" private key for you to sign your own local releases,
1919
# but these .crx files won't detect and upgrade to official HTTPS Everywhere
2020
# releases signed by EFF :/. We should find a more elegant arrangement.
21+
RULESETS_SQLITE="$PWD/src/defaults/rulesets.sqlite"
2122

2223
if [ -n "$1" ]; then
2324
if [ "$1" = today ] ; then
@@ -52,18 +53,7 @@ die() {
5253
}
5354

5455
if [ "$1" != "--fast" ] ; then
55-
if [ -f utils/trivial-validate.py ]; then
56-
VALIDATE="python2.7 ./utils/trivial-validate.py --ignoredups google --ignoredups facebook"
57-
elif [ -f trivial-validate.py ] ; then
58-
VALIDATE="python2.7 trivial-validate.py --ignoredups google --ignoredups facebook"
59-
elif [ -x utils/trivial-validate ] ; then
60-
# This case probably never happens
61-
VALIDATE=./utils/trivial-validate
62-
else
63-
VALIDATE=./trivial-validate
64-
fi
65-
66-
if $VALIDATE src/chrome/content/rules >&2
56+
if python2.7 ./utils/trivial-validate.py --quiet --db $RULESETS_SQLITE >&2
6757
then
6858
echo Validation of included rulesets completed. >&2
6959
echo >&2

0 commit comments

Comments
 (0)