-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$replace modifier #1842
$replace modifier #1842
Conversation
9d48191
to
88592e3
Compare
Co-authored-by: Philipp Claßen <philipp@ghostery.com>
Update: For YouTube, we found a problems with the new adblocker version ( |
Smoke tests Iteration no 1:Tests of: #1842 (comment) Checked features:
Issues:Fixed:Cannot reproduce:Will not be fixed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
}, | ||
{ urls: ['<all_urls>'], types: ['main_frame'] }, | ||
{ urls: ['http://*/*', 'https://*/*'] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add the same constraint on other even listeners? I found a case where we have a callback for our own background page in Firefox (Navigation API) when Dev Tools are opened.
Sometimes I have an error in Chrome, that shows that page from chrome://
can't be accessed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, and it is unclear if onBeforeRequest should process <all_urls> or only http*
and ws*
.
requires ghostery/adblocker#4241
To test basic use-case, try this custom filter
example.com$replace=/Example Domain/Hello from Ghostery/g
at example.comNotice that both
<title>
and<h1>
got updated.This have to be carefully tested on youtube.com once the
$replace
filters are enabled.