Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.17k stars 416 forks source link

[Safari] Tampermonkey as 'Safari App Extension' ? #558

Closed filbo closed 4 years ago

filbo commented 6 years ago

Hi,

Apparently .safariextz style extensions are deprecated (but still operable) in the upcoming Safari 12, and 12 is 'the last release to support them', so either Safari 13 or possibly 12.1(?) will completely drop them. See https://developer.apple.com/documentation/safariextensions for details.

The replacement schema is at https://developer.apple.com/documentation/safariservices/safari_app_extensions/building_a_safari_app_extension, with supposed conversion doc at https://developer.apple.com/documentation/safariservices/safari_app_extensions/converting_a_safari_extension_to_a_safari_app_extension

As far as I can tell, this is Apple's official 'we're getting out of the browser business, just shoot us now' announcement. Instead of adding support for WebExtensions (even borked support like in Edge), they're jumping a fleet of buses over an ocean of sharks, off into some weird Neverland where every browser extension has to have a bag-on-the-side MacOS native app attached to it. But I may be misreading. It's sure as heck presented like that, anyway.

Be that as it may:

Can authors of userscripts rely on any hope of Tampermonkey bridging over this ridiculous gap and continuing to work on Safari 13?

ssbarnea commented 6 years ago

@derjanb I donated too! Thanks for managing it. Now all you have to do is to avoid doing evil stuff, as this would get you out of the store very easy.

riccoho commented 6 years ago

Donated too! It's never easy to maintain a plugin for Safari. Thanks!

GarthSnyder commented 6 years ago

Me too! I should have done it a long time ago, but putting up with Apple's BS is waaay beyond the call of duty. Thanks and best news ever!

GarthSnyder commented 6 years ago

OMG, I even have all my old scripts back. This is awesome. Those were going to be a bear to fish out and re-enter.

dchevell commented 6 years ago

This is such a relief. Donated as well, thank you @derjanb !

jpkelly commented 5 years ago

What we need is an "Open in Chrome" extension.

jpkelly commented 5 years ago

Nice work! DONATED!

isolinear commented 5 years ago

With Safari Technology Preview 80 ( https://webkit.org/blog/8825/release-notes-for-safari-technology-preview-80/ ), "Legacy Safari Extensions (.safariextz files) are no longer supported." It appears they've disabled legacy extension installations in this preview, so even extension gallery extensions are no longer installable.

I imagine the next major macOS update will push this preview into mainline Safari. Are there still plans for a Tampermonkey Safari app extension?

NorthIsUp commented 5 years ago

What is the status of keeping the extension updated?

The extension available on the store is v4.7 with v4.9 being the latest

garily commented 5 years ago

Any plans on submitting a version for the "Safari Extensions" section on the Mac App Store?
Apparently starting from Safari 13 (macOS 10.15) https://safari-extensions.apple.com/details/?id=net.tampermonkey.safari-G3XV72R5TC can no longer be installed.

lonkelle commented 5 years ago

^^^ --- this. I'm going to personally put off updating macOS until there's a way to get Tampermonkey installed in Safari 13 (macOS Catalina's default version).

derjanb commented 5 years ago

Any plans on submitting a version for the "Safari Extensions" section on the Mac App Store?

Unfortunately I don't have a Tampermonkey "Safari App Extension" ready. I do have some kind of prototype, that is able to inject a JavaScript into pages and to communicate with a background page, but even this very limited functionality is very unstable. I'm sorry, but for the moment it looks like there will be no Tampermonkey for Safari 13 and above. 😢

lonkelle commented 5 years ago

Apple forcing an annual fee for free products has always bothered me, but they never did it for the desktop, until now. Safari is too fast to not use - and I've got some time. Do you have that prototype anywhere? I can maybe help finish it up for ya so you'd only need to maintain after that (which hopefully Apple made this new Safari extension mentality future proof enough for you to have to do not much).

daslicht commented 5 years ago

the only thing i like on safari is its bookmark manager and the great its great looking fonts. Speed is the same with Firefox here even with a lot of addons :)

I haven't found an Safari App Extension which is able to block ads on youtube...

charleslaine commented 5 years ago

If I can no longer use tamper monkey in Safari, then I will have no choice but to switch back to Chrome. I just installed Catalina beta last night it was the first thing I noticed was that my extensions were gone.

lonkelle commented 5 years ago

It's why I haven't updated yet. @derjanb - if you have that prototype, I'd love to be a beta tester of it! :)

daslicht commented 5 years ago

@JoelStickney which adblocker for safari can block you tube ads ? I treid uBlock AdBlock Kaboom Magic Lasso non blocks youtube ads ?

raffeyang commented 5 years ago

I found this extension works in Safari 13 .

kfur commented 5 years ago

@daslicht try adguard. it has appstore version.

Rhywun commented 5 years ago

@kfur AdGuard didn't work at all when I tried it. That was, however, one or two Catalina betas ago.

Ghostery Lite does work - but not on YouTube.

(Never mind that what I want is uBlock Origin back...)

kfur commented 5 years ago

you can easily add scripts by creating simple safari extension app in xcode. no code needed. just edit Info.plist file

Screen Shot 2019-08-10 at 12 26 29 AM
kfur commented 5 years ago

@Rhywun maybe it beacuse you was using macos beta version. i use it in my mac and iphone and it working gorgeously.

Rhywun commented 5 years ago

@kfur Yep, no doubt. Just watching this space for any tips dealing with it.

daslicht commented 5 years ago

@daslicht try adguard. it has appstore version. nice ! no add on youtube so far , awesome ! Thank you for the suggestion ! <3

mixmaxdp commented 5 years ago

@derjanb Is there any working download link to latest Tampermonkey.safariextz for Safari 11/12? thanks!

siffegh commented 4 years ago

@mixmaxdp - https://safari.tampermonkey.net/tampermonkey.safariextz?

frankahn commented 4 years ago

Just to make things clear. Safari 13 will be the default version at release date on MacOS 10.15 "Catalina" next month. However, Apple released today a Safari 13 update for both MacOS 10.14 ("Mojave") and MacOS 10.13 ("High Sierra"). All Safari users on these releases (the most common ones currently) will also end up losing Tampermonkey on Safari within a few days.

derjanb commented 4 years ago

I do have good news and also some bad news. :-) The good news is that I make progress in porting Tampermonkey over to an Safari app extension. The bad news is that it will still take some time to complete. I have to learn more about macOS, Xcode, Safari App Extensions and regular macOS apps. 🤯

image

frankahn commented 4 years ago

And you'll need a paying developer account to get it released on the Mac App Store or even just if you want most of the people to be able to launch the app.

Rhywun commented 4 years ago

@derjanb Much appreciated!

In the meantime I am using Firefox but I would like to return to Safari.

YuntianCheng commented 4 years ago

I do have good news and also some bad news. :-) The good news is that I make progress in porting Tampermonkey over to an Safari app extension. The bad news is that it will still take some time to complete. I have to learn more about macOS, Xcode, Safari App Extensions and regular macOS apps. 🤯

image

Happy to hear that, I am tired of chrome, it's too hot.

murphysm2342 commented 4 years ago

Just to make things clear. Safari 13 will be the default version at release date on MacOS 10.15 "Catalina" next month. However, Apple released today a Safari 13 update for both MacOS 10.14 ("Mojave") and MacOS 10.13 ("High Sierra"). All Safari users on these releases (the most common ones currently) will also end up losing Tampermonkey on Safari within a few days.

I got the Safari 13 update notification yesterday and just went ahead and installed it. Unfortunately, didn't know that it was going to automatically remove TM. :-(

cheezmo commented 4 years ago

Yup, I understand that. I lost it a few weeks ago, because I got a new Mac and after migrating, all non Apple Store extensions got turned off.

Hope you get it working eventually, I'll miss it! Apple doing its best to push us to Chrome I guess.

On Sep 20, 2019, at 9:35 AM, murphysm2342 notifications@github.com wrote:

Just to make things clear. Safari 13 will be the default version at release date on MacOS 10.15 "Catalina" next month. However, Apple released today a Safari 13 update for both MacOS 10.14 ("Mojave") and MacOS 10.13 ("High Sierra"). All Safari users on these releases (the most common ones currently) will also end up losing Tampermonkey on Safari within a few days.

I got the Safari 13 update notification yesterday and just went ahead and installed it. Unfortunately, didn't know that it was going to automatically remove TM. :-(

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Tampermonkey/tampermonkey/issues/558?email_source=notifications&email_token=ACRJAWJUNYWSIM7XV3BOBZLQKTNRNA5CNFSM4FDI35PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G4KUY#issuecomment-533579091, or mute the thread https://github.com/notifications/unsubscribe-auth/ACRJAWNNEWTRY4HDUYMG2V3QKTNRNANCNFSM4FDI35PA.

-- Steve Martin

disrupted commented 4 years ago

@murphysm2342 same here. on first startup it told me that 4 extensions were removed, but I don't even remember all their names :(

epsimatic commented 4 years ago

A nice pro for an App Extension is that you can get donations through in-app purchases.

YuntianCheng commented 4 years ago

@murphysm2342 same here. on first startup it told me that 4 extensions were removed, but I don't even remember all their names :(

it also removed my onenote web clipper.

filbo commented 4 years ago

@frankahn wrote:

you'll need a paying developer account to get it released on the Mac App Store

@derjanb wrote on 2018-06-05:

I do have a official developer certificate from Apple

... so at least that much seems to be under control. Also the screenshot looks quite promising :)

What is it taking to bring up TM as an app extension? Any tips for porting other extensions which might have similar habits?

bunnyhero commented 4 years ago

Is there any way I can help out? While I haven't done much in the way of developing for macOS, I am an iOS/Swift developer, and did successfully port a simple Safari extension of my own to a Safari app extension.

Fofer commented 4 years ago

And you'll need a paying developer account to get it released on the Mac App Store or even just if you want most of the people to be able to launch the app.

Just wanted to chime in that I'd be more than happy to donate in order to cover this fee, and I know so many others who would also contribute. In my usage, Safari 13 is completely neutered without TamperMoney. I knew this change was coming, and I braced myself for impact, but this... just... feels wrong, and sad. Mac users, or at the very least, power Mac users, really need a top shelf userscript manager for the OS' default web browser, and TamperMonkey is just such an amazing tool, it would be a real shame to lose it.

@derjanb, I thank you for your work on this, you are very much appreciated!

Fofer commented 4 years ago

on first startup it told me that 4 extensions were removed, but I don't even remember all their names :(

@disrupted, you should be able to see them all still listed in ~/Library/Safari/Extensions. These extensions are not deleted or moved to an "inactive" folder, they're just where they were first installed. Only now, they are inert, unable to load. Because once you upgrade to Safari 13, the app detects and ignores them. They can't be re-loaded.

There isn't even an Extensions Builder anymore in the Develop menu for manual activation. I was able to use that to prolong my enjoyment of the excellent extension Sessions for awhile. :(

For the record, I tried downgrading to my backup of Safari 12, and these disabled extensions still don't load and no longer work. Yes, we were told this was coming. It just sucks to actually experience it. I'm not bothered enough to revert my entire OS from a previous backup in order to keep these extensions and TamperMonkey around. But I sure am close....

Tongzhao9417 commented 4 years ago

I do have good news and also some bad news. :-) The good news is that I make progress in porting Tampermonkey over to an Safari app extension. The bad news is that it will still take some time to complete. I have to learn more about macOS, Xcode, Safari App Extensions and regular macOS apps. 🤯

image

That's the best news i hear before i update to safari 13! uBlock is forbidden and the only hope is tampermonkey can still use! Appreciate you and nobody can prevent me to donate for u! :)

Chandler-Lu commented 4 years ago

That's the best news i hear before i update to safari 13! uBlock is forbidden and the only hope is tampermonkey can still use! Appreciate you and nobody can prevent me to donate for u! :)

maybe you can try to use Adguard for macOS, although it's not free.

ghost commented 4 years ago

Adguard for macOS/Safari is free. I don't know if there's a paid version but the free version exists, though it might not be FOSS (I haven't checked). It uses several extensions to circumvent Safari's filter restrictions, which is as close to UBO as you will get on Safari.

epsimatic commented 4 years ago

uBlock-Safari authors made a good writeup on how to deal with ads after their extension is gone.

You might read it and pick one of options. If any questions about AD blocking in Safari 13+ remains, the linked issue would be a better place to discuss it.

Chandler-Lu commented 4 years ago

Adguard for macOS/Safari is free. I don't know if there's a paid version but the free version exists, though it might not be FOSS (I haven't checked). It uses several extensions to circumvent Safari's filter restrictions, which is as close to UBO as you will get on Safari.

I mean desktop version, not safari extension. This is a system-wide AD filtering software

heydonkey commented 4 years ago

I do have good news and also some bad news. :-) The good news is that I make progress in porting Tampermonkey over to an Safari app extension. The bad news is that it will still take some time to complete. I have to learn more about macOS, Xcode, Safari App Extensions and regular macOS apps. 🤯

image

I don’t mean to speak out of turn, but when you do release TM into the App Store, please make it a paid app to cover your costs. I’d be more than happy to pay for such a useful tool. Thank you.

Tongzhao9417 commented 4 years ago

That's the best news i hear before i update to safari 13! uBlock is forbidden and the only hope is tampermonkey can still use! Appreciate you and nobody can prevent me to donate for u! :)

maybe you can try to use Adguard for macOS, although it's not free.

Thanks Chandler, I have already switched to the Adguard, and as you say, it's powerful. But I don't like the solution which satisfied a requirements to install a software. However, maybe it's the only way to block ads. BTW, the AdGuard is so strong that block some innocent elements LOL. Thanks for u again!

Chandler-Lu commented 4 years ago

Thanks Chandler, I have already switched to the Adguard, and as you say, it's powerful. But I don't like the solution which satisfied a requirements to install a software. However, maybe it's the only way to block ads. BTW, the AdGuard is so strong that block some innocent elements LOL. Thanks for u again!

emm,刚发现好像是国人?可以考虑把自动激活过滤器关掉,然后开几个必要的过滤器像 Easylist China + 默认的英语过滤器就好,还有误杀的话就网站直接加白啦。

emm, you can try to turn off "Activate filters automatically" function and enable a few necessary filter. Excessive rules maybe cause sth wrong.

Juicy0Steak commented 4 years ago

Damn it I shouldn't have updated Safari so blindly... Tampermonkey made Safari great.

ghost commented 4 years ago

It doesn't add much to the topic itself but with version 71 of Firefox Nightly on macOS it fairs much better when it comes to the consumption of resources. Tampermonkey is available for Firefox, as are many other add ons.

I use Firefox since the Phoenix days and it's my main browser everywhere else but on OS X/macOS I was (and am) hesitant to drop Safari entirely, because it is well integrated and used to use much less energy. Adguard is good, but at least for me it seems to slow down Safari a fair bit, where Nightly with UBO feels more "snappy". The removal of Tampermonkey was pretty much last nail. I'm still very interested in the porting to Safari 13 but I guess in the long run I will have to let Safari go as a standard browser, as is, because I don't believe serious devs will be able to keep up with the restrictions of Apple.