dont-track-me-google icon indicating copy to clipboard operation
dont-track-me-google copied to clipboard

[Suggestion] Safari extension

Open igor-makarov opened this issue 4 years ago • 9 comments

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

igor-makarov avatar Oct 13 '21 13:10 igor-makarov

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

Rob--W avatar Oct 23 '21 11:10 Rob--W

What if someone were to sponsor this?

igor-makarov avatar Oct 23 '21 12:10 igor-makarov

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

huabin avatar Nov 14 '21 10:11 huabin

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

igor-makarov avatar Nov 14 '21 10:11 igor-makarov

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

huabin avatar Nov 14 '21 10:11 huabin

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?

Rob--W avatar Nov 15 '21 21:11 Rob--W

@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 avatar Nov 16 '21 00:11 huabin

@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.

huabin avatar Nov 16 '21 09:11 huabin

@Rob--W @igor-makarov

Hello guys, Sorry to trouble you. I updated my GitHub username, could you update it in your reply. Thank you so much.

huabin avatar May 05 '22 10:05 huabin

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.

waynebloss avatar Aug 11 '22 16:08 waynebloss