Skip to content

Commit d2de301

Browse files
Micah Leepde
authored andcommitted
added some stylings
1 parent eb608cc commit d2de301

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

src/chrome/content/code/ApplicableList.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ ApplicableList.prototype = {
6060
var button = document.getElementById('https-everywhere-button');
6161
button.appendChild(commandset);
6262
} else {
63-
// empty commandset
64-
while(commandset.firstChild) { commandset.removeChild(commandset.firstChild); }
63+
// empty commandset
64+
while(commandset.firstChild) { commandset.removeChild(commandset.firstChild); }
6565
}
6666

6767
// add all applicable commands
@@ -80,19 +80,25 @@ ApplicableList.prototype = {
8080
for(var x in this.active) {
8181
var item = document.createElement("menuitem");
8282
item.setAttribute('command', this.active[x].id+'-command');
83+
item.setAttribute('class', 'menuitem-iconic active-item');
84+
item.setAttribute('image', 'chrome://https-everywhere/skin/tick.png');
8385
menupopup.appendChild(item);
8486
}
85-
for (var x in this.inactive) {
87+
for(var x in this.inactive) {
8688
var item = document.createElement("menuitem");
8789
item.setAttribute('command', this.inactive[x].id+'-command');
90+
item.setAttribute('class', 'menuitem-iconic inactive-item');
91+
item.setAttribute('image', 'chrome://https-everywhere/skin/cross.png');
8892
menupopup.appendChild(item);
8993
}
9094

91-
for (var x in this.moot) {
92-
if (! (x in this.active) ) {
95+
for(var x in this.moot) {
96+
if(!(x in this.active) ) {
9397
// rules that are active for some uris are not really moot
9498
var item = document.createElement("menuitem");
95-
item.setAttribute("label","moot " + this.moot[x].name);
99+
item.setAttribute('command', this.moot[x].id+'-command');
100+
item.setAttribute('class', 'menuitem-iconic moot-item');
101+
item.setAttribute('image', 'chrome://https-everywhere/skin/tick-moot.png');
96102
menupopup.appendChild(item);
97103
} else {
98104
this.log(WARN,"Moot rule invisible " + this.moot[x].name);

src/chrome/skin/https-everywhere.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ toolbar[iconsize="small"] #https-everywhere-button {
1212
color: #99FF99;
1313
font-weight: bold;
1414
}
15+
#https-everywhere-button .inactive-item {
16+
color: #999999;
17+
font-weight: bold;
18+
}
19+
#https-everywhere-button .moot-item {
20+
color: #669966;
21+
font-weight: bold;
22+
}

src/chrome/skin/tick-moot.png

540 Bytes
Loading

0 commit comments

Comments
 (0)