@@ -17,8 +17,7 @@ function ApplicableList(logger, uri) {
1717 this . active = { } ;
1818 this . breaking = { } ; // rulesets with redirection loops
1919 this . inactive = { } ;
20- this . moot = { } ; // rulesets that might be applicable but uris are already https
21- this . all = { } ; // active + breaking + inactive + moot
20+ this . all = { } ; // active + breaking + inactive
2221 serial_number += 1 ;
2322 this . serial = serial_number ;
2423 this . log ( DBUG , "Alist serial #" + this . serial + " for " + this . home ) ;
@@ -32,7 +31,6 @@ ApplicableList.prototype = {
3231 this . active = { } ;
3332 this . breaking = { } ;
3433 this . inactive = { } ;
35- this . moot = { } ;
3634 this . all = { } ;
3735 } ,
3836
@@ -58,12 +56,6 @@ ApplicableList.prototype = {
5856 this . all [ ruleset . name ] = ruleset ;
5957 } ,
6058
61- moot_rule : function ( ruleset ) {
62- this . log ( INFO , "moot rule " + ruleset . name + " in " + this . home + " serial " + this . serial ) ;
63- this . moot [ ruleset . name ] = ruleset ;
64- this . all [ ruleset . name ] = ruleset ;
65- } ,
66-
6759 dom_handler : function ( operation , key , data , src , dst ) {
6860 // See https://developer.mozilla.org/En/DOM/UserDataHandler
6961 if ( src && dst )
@@ -182,19 +174,13 @@ ApplicableList.prototype = {
182174 this . add_command ( this . breaking [ x ] ) ;
183175 for ( var x in this . active )
184176 this . add_command ( this . active [ x ] ) ;
185- for ( var x in this . moot )
186- this . add_command ( this . moot [ x ] ) ;
187177 for ( var x in this . inactive )
188178 this . add_command ( this . inactive [ x ] ) ;
189179
190180 if ( https_everywhere . prefs . getBoolPref ( "globalEnabled" ) ) {
191181 // add all the menu items
192182 for ( var x in this . inactive )
193183 this . add_menuitem ( this . inactive [ x ] , 'inactive' ) ;
194- // rules that are active for some uris are not really moot
195- for ( var x in this . moot )
196- if ( ! ( x in this . active ) )
197- this . add_menuitem ( this . moot [ x ] , 'moot' ) ;
198184 // break once break everywhere
199185 for ( var x in this . active )
200186 if ( ! ( x in this . breaking ) )
@@ -220,9 +206,8 @@ ApplicableList.prototype = {
220206 this . commandset . appendChild ( command ) ;
221207 } ,
222208
223- // add a menu item for a rule -- type is "active", "inactive", "moot",
209+ // add a menu item for a rule -- type is "active", "inactive"
224210 // or "breaking"
225-
226211 add_menuitem : function ( rule , type ) {
227212 // create the menuitem
228213 var item = this . document . createElement ( 'menuitem' ) ;
@@ -233,37 +218,20 @@ ApplicableList.prototype = {
233218
234219 // we can get confused if rulesets have their state changed after the
235220 // ApplicableList was constructed
236- if ( ! rule . active && ( type == 'active' || type == 'moot' ) )
221+ if ( ! rule . active && ( type == 'active' ) )
237222 type = 'inactive' ;
238223 if ( rule . active && type == 'inactive' )
239- type = 'moot ' ;
240-
224+ type = 'active ' ;
225+
241226 // set the icon
242227 var image_src ;
243228 if ( type == 'active' ) image_src = 'tick.png' ;
244229 else if ( type == 'inactive' ) image_src = 'cross.png' ;
245- else if ( type == 'moot' ) image_src = 'tick-moot.png' ;
246230 else if ( type == 'breaking' ) image_src = 'loop.png' ;
247231 item . setAttribute ( 'image' , 'chrome://https-everywhere/skin/' + image_src ) ;
248232
249233 // all done
250234 this . prepend_child ( item ) ;
251- } ,
252-
253- show_applicable : function ( ) {
254- this . log ( WARN , "Applicable list number " + this . serial ) ;
255- for ( var x in this . active )
256- this . log ( WARN , "Active: " + this . active [ x ] . name ) ;
257-
258- for ( var x in this . breaking )
259- this . log ( WARN , "Breaking: " + this . breaking [ x ] . name ) ;
260-
261- for ( x in this . inactive )
262- this . log ( WARN , "Inactive: " + this . inactive [ x ] . name ) ;
263-
264- for ( x in this . moot )
265- this . log ( WARN , "Moot: " + this . moot [ x ] . name ) ;
266-
267235 }
268236} ;
269237
0 commit comments