Opened on 02/11/2019 at 05:25:20 PM
Closed on 08/29/2019 at 05:43:18 PM
#7275 closed defect (rejected)
Cannot filter list in DevTools by $document
Reported by: | greiner | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Platform | Keywords: | closed-in-favor-of-gitlab |
Cc: | sebastian, kzar, arthur | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Environment
Ubunut 16.04
Chrome 71
Adblock Plus 3.4.1
How to reproduce
- Add the custom filter @@||www.youtube-nocookie.com^$document,domain=adblockplus.org
- Go to adblockplus.org
- Open DevTools window and switch to "Adblock Plus" tab
- Click twice on homepage video to load YouTube frame
- Filter list to only show entries with "DOCUMENT" type
Observed behaviour
No such option exists.
Expected behaviour
Option exists and list can be filtered to only show entries with "DOCUMENT" type.
Further information
While we decide in adblockplusui/lib/messageResponder.js which types the user is able to user as a filter, we generate that list in adblockpluschrome/lib/requestBlocker.js.
First, it's questionable whether filterTypes should be used since the "data-type" attribute on each entry corresponds to the request type.
Secondly, filterTypes doesn't contain "DOCUMENT" because neither does browser.webRequest.ResourceType which this list is primarily based on.
Attachments (0)
Change History (3)
comment:1 Changed on 02/11/2019 at 05:25:35 PM by greiner
- Cc arthur added
comment:2 Changed on 03/05/2019 at 04:45:38 AM by sebastian
comment:3 Changed on 08/29/2019 at 05:43:18 PM by sebastian
- Keywords closed-in-favor-of-gitlab added
- Resolution set to rejected
- Status changed from new to closed
Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.
We add other items to filterTypes (in lib/requestBlocker.js) that aren't mapped from browser.webRequest.ResourceType, specifically so that they show up here (e.g. POPUP). However, whitelisting-only types (i.e. DOCUMENT, GENRICBLOCK and GENERICHIDE) aren't included.
Back then, I might have thought filtering for whitelisted requests is good enough in that case, also I didn't want to unnecessarily bloat the list of drop down items. Finally, IIRC, you couldn't filter for these types in "blockable items" in the legacy Gecko extension either.
FWIW, the whole filtering UI of the devtools panel isn't great, but it's the best I could come up with for the MVP back then. Maybe it's time to revamp it in a way that scales better with more filtering options.