-
Notifications
You must be signed in to change notification settings - Fork 871
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
Added URL Sanitizer service and Copy Clean URL item for links #14763
Conversation
2f8e81c
to
d090f78
Compare
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.
Which contextual menu is this hooking into? It looks like it might be the one you get when you right-click on a link. If that's the case, then that was the original idea (the screenshot in the issue), but I ended up changing this in the spec because I realized that these URLs are not fully clean already and so they're more complicated to handle.
What I suggest instead in the spec is to hook into the contextual menu you get when you right-click on the address in the URL bar. That URL will have gone through the debouncer and the regular query filter and so all that's left to remove is the contents of the new JSON list. We can leave the link contextual menu for a later phase.
components/url_sanitizer/browser/url_sanitizer_service_unittest.cc
Outdated
Show resolved
Hide resolved
8675a64
to
9011d4a
Compare
done |
f142e6a
to
0881cd8
Compare
I like it! |
c58b834
to
13730f2
Compare
d301412
to
0d2b039
Compare
378b971
to
93bc811
Compare
843a85c
to
1e96524
Compare
I have the code checked out locally and built - but it doesn't seem to be working Here are the steps I tried:
|
OK seems I opened the file manually ( This worked great as expected 👍 Sanitized URL looks like this: |
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.
Left comments - maybe we can use brave/brave-browser#10188 as the follow up issue?
The list (matching the spec) doesn't seem to be live yet. But as shared, I tested by manually pasting the list from https://github.com/brave/adblock-lists/blob/master/brave-lists/clean-urls.json and it works great
I think we should file a separate follow-up issue because we could merge the parsing code between these two features without waiting for the lists to get merged, which is going to be trickier. |
9ddb83e
to
3fa0ced
Compare
you need to do |
Created brave/brave-browser#25104 as the follow up for the refactoring 😄👍 |
3fa0ced
to
53d9189
Compare
53d9189
to
df4cf3a
Compare
Resolves brave/brave-browser#23315
MVP implementation for url sanitization, spec https://docs.google.com/document/d/1ea7eF3s0WTsTlmMPr8LYp5KUyNg8eK4omjizo27qvJE/edit#
- Added an item to the address bar context menu to copy clean url
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: