Index: devtools-panel.js |
=================================================================== |
--- a/devtools-panel.js |
+++ b/devtools-panel.js |
@@ -14,16 +14,27 @@ |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
"use strict"; |
let lastFilterQuery = null; |
Jon Sonesen
2017/08/21 15:31:07
Should I comment here about the filter-type genera
Thomas Greiner
2017/08/22 11:21:46
Feel free to if you want.
|
+ext.backgroundPage.sendMessage({type: "request.getTypes", what: "filterTypes"}, |
Thomas Greiner
2017/08/22 11:21:46
Detail: You're not retrieving requests but filter
Jon Sonesen
2017/08/24 11:29:05
Acknowledged.
|
+ (filterTypes) => |
+ { |
+ for (let type in filterTypes) |
Thomas Greiner
2017/08/22 11:21:46
`filterTypes` is an array but for-in loops are ite
Jon Sonesen
2017/08/24 11:29:05
Acknowledged.
|
+ { |
+ let optionNode = document.createElement("option"); |
+ optionNode.appendChild(document.createTextNode(filterTypes[type])); |
+ document.getElementById("filter-type").appendChild(optionNode); |
Thomas Greiner
2017/08/22 11:21:46
Suggestion: It's usually good practice to keep DOM
Jon Sonesen
2017/08/24 11:29:05
Acknowledged.
|
+ } |
+ }); |
+ |
function generateFilter(request, domainSpecific) |
{ |
let filter = request.url.replace(/^[\w-]+:\/+(?:www\.)?/, "||"); |
let options = []; |
if (request.type == "POPUP") |
{ |
options.push("popup"); |