Skip to content
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 #71

Closed
wants to merge 6 commits into from
Closed

Safari #71

wants to merge 6 commits into from

Conversation

khesed
Copy link

@khesed khesed commented Sep 8, 2023

Output during conversion:

Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:

type
default_area

Warning: Persistent background pages are not supported on iOS and iPadOS. You will need to make changes to support a non-persistent background page.

Photos:

  • Initial launch window: Initial Launch Window
  • Safari extension setting page: Safari Extension Settings Page
  • uBOL tooltip pane (can be dragged): SCR-20230907-pqmx
  • uBOL preference page: SCR-20230907-ppia

@gorhill
Copy link
Member

gorhill commented Sep 9, 2023

That is not the place or the way to make a Safari port of uBO Lite. For instance, the Firefox version is not a conversion of the Chromium version, the packages are created from build tools in https://github.com/gorhill/uBlock/tree/master/platform/mv3, and for each platform there is a folder with all the platform-specific files. A conversion tool shouldn't be needed to make a Safari version, if only to identify which files are platform-specific, and adding them to a /platform/mv3/safari folder.

Here is solely to keep track of changes between versions for officially supported, published versions of uBO Lite.

Furthermore, there need to be an investigation of API compatibility, I started to work on this here, and a Safari version would require a minimal amount of expected functionalities before an official support, otherwise the repo is going to fill with issue reports I can't address myself as I do not have access to Safari.

@khesed
Copy link
Author

khesed commented Sep 9, 2023

That is not the place or the way to make a Safari port of uBO Lite. For instance, the Firefox version is not a conversion of the Chromium version, the packages are created from build tools in https://github.com/gorhill/uBlock/tree/master/platform/mv3, and for each platform there is a folder with all the platform-specific files. A conversion tool shouldn't be needed to make a Safari version, if only to identify which files are platform-specific, and adding them to a /platform/mv3/safari folder.

When I get a chance, I will investigate what platform specific files are necessary and add them there.

Here is solely to keep track of changes between versions for officially supported, published versions of uBO Lite.

I will familiarize myself with the uBO GitHub before making another PR, and I'll make a PR there instead of here next time.

Furthermore, there need to be an investigation of API compatibility, I started to work on this here, and a Safari version would require a minimal amount of expected functionalities before an official support, otherwise the repo is going to fill with issue reports I can't address myself as I do not have access to Safari.

Are all of those listed in that table necessary for a minimum viable Safari version?
Is it just the ? which are not investigated that you would like someone to investigate?

@khesed
Copy link
Author

khesed commented Sep 9, 2023

investigation of API compatibility, I started to work on this here

Here's what I found:

I couldn't find anything on declarativeNetRequest.RuleCondition.domainType and .initiatorDomains

declarativeNetRequest.getAvailableStaticRuleCount, declarativeNetRequest.RuleAction.responseHeaders, declarativeNetRequest.RuleCondition.requestMethods and .excludedRequestMethods, and storage.[managed] remain unsupported.

@khesed khesed closed this Sep 9, 2023
@gorhill
Copy link
Member

gorhill commented Sep 9, 2023

a minimum viable Safari version

Just from the screenshots you posted, it appears a minimum viable version of Safari is not there yet. For example, Firefox version was much more functional and yet I had to wait to find a fix for the fact that Firefox's scripting API did not support the MAIN execution context to feel comfortable that it was minimally functional. There is still an issue with Firefox version that I found after I thought all was good, which is that it doesn't support DNR's domainType property yet.

Feel free to improve the wiki page if you have reliable information about what Safari supports or not, the MDN pages are not all accurate at this point and thus I used ? when I couldn't tell from MDN.

@stephenhawk8054
Copy link
Member

I think completing the wiki page is more important to reduce the chance of breakage / improve compatibility before starting another extension.

@OhYello
Copy link

OhYello commented Sep 19, 2023

Does this work for the new macOS release?

@arjpar
Copy link

arjpar commented Sep 19, 2023

@OhYello If by "work" you mean MVP, then no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants