-
Notifications
You must be signed in to change notification settings - Fork 1.1k
redirecting AMP to canonical pages #4950
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
Conversation
dd7db51 to
e2edd53
Compare
simonhong
left a comment
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.
Overall looks good to me.
Can you file an issue for this PR if not filed yet and write it in this PR's description?
and Please check submitter's checklist.
e2edd53 to
c7bdf89
Compare
|
Previous build passed on all platforms but macos, with what looked like transient errors on macos. Skipping other platforms to speed up |
… AMP pages and redirect
c7bdf89 to
76f54d9
Compare
simonhong
left a comment
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.
++
|
I would prefer it the other way around 😂 |
| if (action.isMainFrame) { | ||
| ampAPI.getAMPNeutralized().then(ampNeutralized => { | ||
| if (ampNeutralized) { | ||
| chrome.tabs.executeScript(action.tabId, { |
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.
we can do the redirect in the native code, we really want to avoid using extensions for stuff like this. Check out brave_common_static_redirect_network_delegate_helper
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.
so actually in moving this to greaselion we will just conditionally enable this content script when the pref values changes so this won't be needed at all
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.
bridiver
left a comment
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.
we should use native code for this
|
I don't care where it happens. I just wish it would happen. 😔 |
|
De-amp was implemented and shipped |
Trivial script (similar to what existing extensions use) to locate canonical URL in AMP pages and redirect, if user has turned the option ON in settings, under shields. Off by default.
Resolves brave/brave-browser#8720
Submitter Checklist:
npm run lint)git rebase master(if needed).git rebase -ito squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.