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

[Suggestion] Safari extension #46

Open
igor-makarov opened this issue Oct 13, 2021 · 9 comments
Open

[Suggestion] Safari extension #46

igor-makarov opened this issue Oct 13, 2021 · 9 comments

Comments

@igor-makarov
Copy link

I've managed to run the extension source code through Xcode's safari-web-extension-converter tool, and I was able to compile and use an extension that works on Safari 14. It just works, and it's really useful!

Would you be interested in publishing it to the Apple App Store or distributing a notarized and signed version independently?

Here's some more info on the converter process: https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari

@Rob--W
Copy link
Owner

Rob--W commented Oct 23, 2021

Distributing a Safari extension requires a recurring payment of 99$ every year. I don't see a value in doing that right now.

@igor-makarov
Copy link
Author

What if someone were to sponsor this?

@huabin
Copy link

huabin commented Nov 14, 2021

@igor-makarov You might need this https://github.com/tourcoder/DTMG. I ported it for Safari, and the code is open-sourced.

@igor-makarov
Copy link
Author

@tourcoder that doesn't really help making it available for Safari - you still need Xcode to load the extension.

@huabin
Copy link

huabin commented Nov 14, 2021

@igor-makarov I've submitted this extension to Apple, and I'll provide a link here once it's approved.

@Rob--W
Copy link
Owner

Rob--W commented Nov 15, 2021

What if someone were to sponsor this?

Thanks for the offer, but I'm not accepting that. The issue is not 99$ itself, but having to pay 99$ per year for just the privilege of publishing an extension.

@tourcoder Your Safari extension appears to be a copy of the script, plus some metadata. After a quick look, there are at least three issues: 1) there is a redundant background script in it. 2) there is a redundant extension button 3) the content script is not run at document_start`. And odds are that the script may or may not only work partially in Safari, because Google is known to serve different kinds of web page front-ends to different browsers (even different versions of the same browser).

Besides the issues in the extension, I also wonder about the long-term support plan. Are you currently already paying 99$ anually? And are you going to pay the annual 99$ fee to support users?

@huabin
Copy link

huabin commented Nov 16, 2021

@Rob--W

  1. The background script is automatically generated when the project is created in Xcode. It will not work because it is not called.
  2. Which button?
  3. I tested it in Safari on the latest five major versions of macOS, it works and I will add document_start to test.
  4. My current Apple development account has been in use for many years, over 10 years. So don't worry about the long-term support plan. I have also provided my email to facilitate support to users.

@huabin
Copy link

huabin commented Nov 16, 2021

@igor-makarov @Rob--W It's on AppStore now, link is https://apps.apple.com/us/app/dtmg-target-links/id1595441111?mt=12, or search DTMG - Target Links.

@ghost
Copy link

ghost commented Aug 11, 2022

You don't need a new extension to use this tool.

You can install the existing iOS Safari Userscripts extension. Then take a copy of the contentscript.js file from this repo and add this header at the top:

// ==UserScript==
// @name         AntiGoogle
// @match        *://*.google.com/*
// @version      1.0
// ==/UserScript==

Save the file and upload it to your iCloud drive or do whatever you need to, to get the file onto your device.

When you setup the Userscripts extension, I recommend using a folder on your device and not an iCloud synced folder. Otherwise the extension won't always find the scripts in time.

This DevTools extension is also very helpful for debugging your custom userscripts if you don't want to buy a Mac 🤮 just to debug on iOS Safari.

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

No branches or pull requests

3 participants