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支持 #18

Open
lisongx opened this issue Jun 10, 2020 · 4 comments
Open

增加Safari支持 #18

lisongx opened this issue Jun 10, 2020 · 4 comments

Comments

@lisongx
Copy link
Owner

lisongx commented Jun 10, 2020

No description provided.

@lleiou
Copy link

lleiou commented Jun 13, 2020

safari 不再支持 .safariextz 格式的 legacy extensions 了, 现在似乎需要先在 Xcode 里面 build 一个 macOS app, 然后在 app 里面加 一个 safari app extension target.

@lisongx
Copy link
Owner Author

lisongx commented Jun 14, 2020

@lleiou
所以开发起来还是挺麻烦的?觉得主要似乎是safari不支持 WebExtensions api, 所以代码不是很方便复用。
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

看来是需要safari单独开发了!

@lleiou
Copy link

lleiou commented Jun 14, 2020

@lisongx

对的, 不能直接使用, 需要改一改. Xcode 里面有专门做 safari app extension 的选项, 应该可以把改好的 .js 代码放到里面.

在 github 上找到了一个 safari app extension 的 repo, 大概做出来就是这样: lautis/refined-github-safari

@lleiou
Copy link

lleiou commented Jun 23, 2020

@lleiou
所以开发起来还是挺麻烦的?觉得主要似乎是safari不支持 WebExtensions api, 所以代码不是很方便复用。
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

看来是需要safari单独开发了!

周二 (2020-06-23) 好像会有一个 wwdc online session 来介绍 safari-web-extension-converter tool, 准备到时候看一下. 如果这个工具好用的话, 提供 safari support 会容易许多:

"We'll show you how to build a new Safari Web Extension and host it on the App Store, as well as how to use the safari-web-extension-converter tool to migrate existing extensions from other web browsers like Chrome, Firefox, or Edge with very little effort."

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

No branches or pull requests

2 participants