Opened on 10/28/2018 at 11:40:10 PM
Closed on 10/29/2018 at 03:45:31 PM
Last modified on 03/08/2019 at 10:05:15 AM
#7074 closed change (fixed)
Keep filter objects in ElemHideEmulation and Snippets modules
Reported by: | mjethani | Assignee: | mjethani |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Core | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | yes |
Review URL(s): |
Description (last modified by mjethani)
Background
In lib/elemHideEmulation.js and lib/snippets.js, the add and remove functions add and remove the text of the filter rather than the filter object itself. It's not clear why this was done originally in lib/elemHideEmulation.js, but it doesn't make any sense to create a new filter object each time the filters are looked up. It never made sense for snippets and was only done to stay consistent with element hiding emulation.
What to change
In lib/elemHideEmulation.js and lib/snippets.js, save filter objects directly instead of saving just the filter text.
Hints for testers
Test that element hiding emulation and snippet filters work correctly.
Here's a test document:
<!DOCTYPE html> <div id="ad">This is an ad.</div>
The filter localhost#?#div:-abp-contains(This is an ad) should hide the ad. Once the filter is removed and the page is refreshed, the ad should no longer be hidden. Similarly, the filter localhost#$#log 'Hello snippets' should print out Hello snippets to the console. Once the filter is removed and the page is refreshed, Hello snippets should not appear in the console.
Attachments (0)
Change History (6)
comment:1 Changed on 10/28/2018 at 11:46:38 PM by mjethani
- Summary changed from Save filter objects directly in ElemHideEmulation and Snippets modules to Keep filter objects in ElemHideEmulation and Snippets modules
comment:2 Changed on 10/29/2018 at 01:43:31 PM by abpbot
comment:4 Changed on 10/29/2018 at 03:45:31 PM by mjethani
- Resolution set to fixed
- Review URL(s) modified (diff)
- Status changed from new to closed
comment:5 Changed on 02/07/2019 at 03:23:49 AM by abpbot
A commit referencing this issue has landed:
Issue 7074 - Keep filter objects instead of text
comment:6 Changed on 03/08/2019 at 10:05:15 AM by ukacar
- Verified working set
A commit referencing this issue has landed:
Issue 7074 - Keep filter objects instead of text