Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
5 */ | 5 */ |
6 | 6 |
7 let {Prefs} = require("prefs"); | 7 let {Prefs} = require("prefs"); |
8 | 8 |
9 let domainData; | 9 let domainData; |
10 let nodeData; | 10 let nodeData; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 else { | 103 else { |
104 obj.__defineGetter__(key, function() { | 104 obj.__defineGetter__(key, function() { |
105 return orig[key]; | 105 return orig[key]; |
106 }); | 106 }); |
107 obj.__defineSetter__(key, function(value) { | 107 obj.__defineSetter__(key, function(value) { |
108 orig[key] = value; | 108 orig[key] = value; |
109 }); | 109 }); |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 var atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomService ); | 113 function TreeView_getRowProperties(row) { |
Wladimir Palant
2014/06/18 17:20:48
Element Hiding Helper currently supports Firefox 2
saroyanm
2014/06/19 07:24:26
Done.
| |
114 var selectedAtom = atomService.getAtom("selected-false"); | 114 let property = ""; |
115 var anchorAtom = atomService.getAtom("anchor"); | |
116 | |
117 function TreeView_getRowProperties(row, properties) { | |
118 if (!this.selection.isSelected(row)) | 115 if (!this.selection.isSelected(row)) |
119 properties.AppendElement(selectedAtom); | 116 property += "selected-false"; |
Wladimir Palant
2014/06/18 17:20:48
Given that we no longer need atoms for all propert
saroyanm
2014/06/19 07:24:26
Good point,
Thanks.
| |
120 | 117 |
121 var item = this.getItemAtIndex(row); | 118 var item = this.getItemAtIndex(row); |
122 if (item && (item.nodeData.expression != "*" || item.nodeData == nodeData)) | 119 if (item && (item.nodeData.expression != "*" || item.nodeData == nodeData)) |
123 properties.AppendElement(anchorAtom); | 120 property += (property ? " anchor" : "anchor"); |
121 | |
122 return property; | |
124 } | 123 } |
125 | 124 |
126 function TreeView_getCellProperties(row, col, properties) { | 125 function TreeView_getCellProperties(row, col) { |
127 this.getRowProperties(row, properties); | 126 this.getRowProperties(row); |
128 } | 127 } |
129 | 128 |
130 /********************* | 129 /********************* |
131 * General functions * | 130 * General functions * |
132 *********************/ | 131 *********************/ |
133 | 132 |
134 function init() { | 133 function init() { |
135 var element = window.arguments[0]; | 134 var element = window.arguments[0]; |
136 doc = element.ownerDocument; | 135 doc = element.ownerDocument; |
137 var wnd = doc.defaultView; | 136 var wnd = doc.defaultView; |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 | 634 |
636 fillAttributes(item.nodeData); | 635 fillAttributes(item.nodeData); |
637 } | 636 } |
638 | 637 |
639 function addExpression() | 638 function addExpression() |
640 { | 639 { |
641 AdblockPlus.addPatterns([document.getElementById("expression").value]); | 640 AdblockPlus.addPatterns([document.getElementById("expression").value]); |
642 | 641 |
643 togglePreview(false); | 642 togglePreview(false); |
644 } | 643 } |
OLD | NEW |