Rob--W / dont-track-me-google

Firefox and Chrome extensions to prevent Google from making links ugly.
MIT License
459 stars 26 forks source link

[Suggestion] Safari extension #46

Open igor-makarov opened 2 years ago

igor-makarov commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

What if someone were to sponsor this?

huabin commented 2 years ago

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

igor-makarov commented 2 years ago

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

huabin commented 2 years ago

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

Rob--W commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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 :vomiting_face: just to debug on iOS Safari.