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
feature: maybe it's time to rethink the possibility of porting to Safari #52
Comments
Hi, |
I don't have MacOS, this would have to be undertaken by a another volunteer developer. Anyways, the implementation of declarativeNetRequest API on Safari is missing key capabilities for the current state of uBOL, it does not support conditions such as Additionally, the Safari |
@gorhill |
Just noticed that Apple added support for
I think this feature is available in Safari 16 but Apple haven't updated their documentation. |
Safari 16.4 is out of beta now, not sure how close this gets us. |
I’ve posted on Mastodon to Jen and Jon from the WebKit team, let’s see if they’re considering the missing capabilities mentioned by Raymond https://mastodontech.de/@dminca/110135906549832299 |
Any updates for Safari 17 (macOS Sonoma)? |
Transferring the issue to uBO Lite issues repo because if ever there is a port to Safari, that will be MV3 uBO Lite, not uBO, which requires MV2. |
Are there currently any other barriers to entry for restarting development of the Safari Extension for uBOL? Perhaps there is an opportunity to engage the broader community to alleviate some of those impediments (if there are any) |
Maybe the only barrier is someone willing to fork and develop it for Safari? |
Converting the firefox variant with the safari-web-extension-converter seems to work somehow out of the box on macOS Sonoma. |
@hadig I'm also willing to work on porting UBO Lite with whatever code you have. Since UBO is such a highly used extension I'm sure there are others (even if few) that may be willing to work on porting it (UBO Lite) to Safari. |
Made a PR: #71 |
I know uBlock team is famous for not taking donations (for all the right reasons I might add) but just wanted to say if another interested developer would like to develop but has monetary hurdles myself and a LOT of other Safari users would be happy to contribute. |
Is there any update on this issue/suggestion? |
@Webtapper There's no update that I know of. A PR was made and rejected because Safari's implementation of DNR (declarativeNetRequest) lacks some specific features that uBO-Lite on Chrome/(Firefox?) requires to function properly. There was no minimal viable product in the PR. I'd be more than happy to develop a port, without donations, but I need to check how much support for DNR the Safari team has added. The WebKit devs have moved the project to GitHub, and they're willing to engage with the developer community. I'm sure I/someone else can look at Safari's documentation for DNR and see what is missing/implemented for an MVP for Safari to come to fruition. In the PR I mentioned above, @gorhill stated that specific APIs weren't supported by Safari's DNR implementation, and an investigation was/is needed to figure out which APIs are and are not supported. Like I said above, I'd be more than happy to port uBO-Lite to safari, I just haven't had the time. The requirement for a Safari extension to also be published on the app store and fulfilling the requirements for that ($100 for a dev license) is also one thing that may put a strain on a port. Hopefully this answered your question! |
Just FYI that any volunteers who want to take a look can check the table comparison of Safari's MV3 ability here: https://github.com/uBlockOrigin/uBOL-home/wiki/Availability-of-MV3-APIs-used-by-uBOL I think it's better to PR and complete the table with clear sources first to have a better picture of Safari's compatibility with uBOL. |
For/to all those concerned, I'll be starting work on a port here, and then eventually pushing upstream. |
so update: it will need work to get it to work on safari. i have the extension running, but its very buggy and actually breaks safari haha. it doesn't support "storage" or "type" keys in the manifest, which may prevent a mvp until apple adds those keys. |
There is a
For Edge, it's a patched version of Chromium Once you have a proper Safari-compliant |
Thanks @arjpar. I do not have the knowledge to help with any technical challenges here - but if we are at the stage of needing to raise $100 for the developer license I’d love to contribute as well. I’ll follow it here and appreciate your updates so far!! |
For those wondering, I'll be posting updates here |
Due to the issues explained here which explains the problems I've run into, a port of uBlock Origin Lite to Safari is currently not possible. It is, however, possible to make an excellent free & open source wide spectrum (ad blocker) content blocker for Safari using the relevant Safari-specific APIs and technologies for content blocking. But that is beyond the scope of my port, and it would not be a port of uBlock Origin Lite, it would be either a fork or a new project altogether. I don't have the time, effort, or knowledge of Apple ecosystem development to create such an extension. I welcome anyone who has those things to consider creating it if they want to. For the aforementioned reasons my Safari port of uBlock Origin Lite will cease development. (All the work I've been doing so far was locally) I doubt Apple will release the needed MV3 DNR APIs soon given that they have their own Safari specific ways of doing things. If they do eventually release those APIs and don't neuter them, I probably won't be working on a port, due to the previous reasons of not creating a new Safari ad block project - time, effort, and knowledge. |
Fair enough. You are correct in that Safari has its own APIs which serve similar purposes (and in some ways, I would argue have benefits over DNR APIs, but at the expense of cross-compatibility), so a Safari port would likely be its own thing at this point, which hybridizes compatible uBlock methods with Safari specific Content Blocking methods. Likewise, whilst App Store distribution isn't necessary, the extension being unsigned or otherwise signed by an unrecognized signing authority would make distribution more cumbersome. Thank you for at least trying and/or looking into it. As a Safari user looking to move away from AdGuard, the attempt was appreciated. |
Just asking if it's possible to make this wonderful extension available for Safari now, given the following article published by Apple Developers in regards to converting web extensions for Safari
https://developer.apple.com/news/?id=qiz0arxc
Prerequisites
Description
[Description of the bug or feature]
A specific URL where the issue occurs
[A specific URL is MANDATORY for issue happening on a web page, even if it happens "everywhere"]
Steps to Reproduce
Expected behavior:
[What you expected to happen]
Actual behavior:
[What actually happened]
Your environment
The text was updated successfully, but these errors were encountered: