-
Notifications
You must be signed in to change notification settings - Fork 248
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
Safari MV3 Prototype #1804
Draft
sammacbeth
wants to merge
20
commits into
duckduckgo:main
Choose a base branch
from
sammacbeth:sam/202302/safari
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Safari MV3 Prototype #1804
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browserName = '' | ||
} else { | ||
browserName = '-' + browserName + (chrome?.runtime.getManifest().manifest_version === 3 ? 'mv3' : '') | ||
} | ||
return `https://staticcdn.duckduckgo.com/trackerblocking/config/v2/extension${browserName}-config.json` | ||
// return `https://staticcdn.duckduckgo.com/trackerblocking/config/v2/extension${browserName}-config.json` | ||
return `https://pyrite-scarce-agenda.glitch.me/staticcdn/trackerblocking/config/v2/extension${browserName}-config.json` |
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.
Lately I've been wondering if we should propose a QWD or similar ability to save this to extension config through the extension dev tools.
Editing list-editor doesn't stick long enough either.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a prototype of how we might add a new Safari MV3 build target, using Safari's new MV3 Webextension APIs. Comments on the implementation:
requestDomain
support does not currently work (as of Safari 16.3 and Safari Technology Preview 165), so we end up with more rules due to this limitation. There is a hack in place to avoid using remote TDS to make this work.browsers/safari
. After building the extension, we copy it intobrowsers/safari/safari-mv3/Shared\ \(Extension\)/Resources/
, which this project reads to pack the 'extension app'.events.js
- that file uses many APIs that are not present on Safari (e.g.webRequest
) so importing it would break the build.webRequest
listeners for tab tracking, and not allwebNavigation
events are available, I've had to extract that code that was inevents.js
into afeatures/tab-tracking.js
file that keepstabManager
updated to tab changes from the available events.convertDNRRuleset
insafari-compat.js
) that fixes up rules to work in Safari.document_start
is not supported, I'm doing dynamic injection onwebNavigation.onCommited
, which seems to be faster thandocument_idle
.