hoyois / clicktoplugin

Prevents plug-ins from loading automatically in Safari
http://hoyois.github.com/safariextensions/clicktoplugin/
229 stars 43 forks source link

YouTube killer broken again #180

Open LincDavis opened 7 years ago

LincDavis commented 7 years ago

As of the last couple of days, the current-version YouTube killer causes the player to be replaced by a black window with a play button that does nothing. All pages that I've tried are affected. With CTP disabled, YouTube works normally. Safari 10.1.

JohnBlackburne commented 7 years ago

I had the same since the update to macOS. I had a look at myself and stoped it crashing by removing a string, with no obvious side effects. The change is to one line in MediaPlayer.js. I created a fork with it in; as it’s no longer being updated you would have to grab it and build it yourself:

https://github.com/JohnBlackburne/clicktoplugin

Only tested with YouTube as that’s about the only site CTP still works for me.

Roy75117 commented 7 years ago

How to wrap up the source code to be a safari extension?

Roy75117 commented 7 years ago

It seems need Developer Certificates to build up safariextz, Is it possible to provide .safariextz file here? Thanks

hoyois commented 7 years ago

You can fix this using the following killer:

https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js

This redefines the function in MediaPlayer.js containing the problematic CSS. As always I recommend loading this script from your local server.

The cause of this problem is that the latest Safari version cries foul on CSS selectors with multiple pseudo-elements, which are used in the styling of CTP's HTML5 player. This might be a bug that will disappear in future Safari updates.

@JohnBlackburne Your solution works "by accident": it changes the problematic CSS selector into one that doesn't match anything. If you can compile the extension, please use the initShadowDOM function from the above script.

LincDavis commented 7 years ago

Thanks, I confirm problem solved.

Roy75117 commented 7 years ago

@hoyois @LincDavis Is it possible to release a WA safariextz in case that Apple do not fix this safari bug? Would really need this extension. Thanks

JohnBlackburne commented 7 years ago

Yes, my fix was just a hack, a case of trying a couple of things at the point where it was halting. I was not going to share it until I noticed others having the problem, and put my 'fix' up as I understood that there will not be another release of the compiled extension.

Roy75117 commented 7 years ago

@JohnBlackburne I have tried your WA. It indeed worked. However, I can not build out the safari extension because of lack of Developer Certificates. Still wanna figure out any way to get a WA compiled extension

hoyois commented 7 years ago

Let's leave this open for visibility.

dvincent747 commented 7 years ago

Can confirm the CSSfix killer works for me as well.

If the cost of the developer certificate is keeping this extension dead, I would gladly pony up a donation for keeping this alive and in active development. I'm not much of a programmer, but I could probably fork the project and at least compile it and have it as an active extension. Or just donate to a developer who wants to maintain it better than I could.

ballo commented 7 years ago

Hm, there is no "Allow Unsigned Extensions" item in my Develop menu. Is this a newer option?

Safari 10.0.3 on Yosemite

Roy75117 commented 7 years ago

@ballo https://myownapp.com/manuals/tutorial_create_safariextension/ FYI

Fofer commented 7 years ago

Glad I found this thread. ClickToFlash remains my favorite extension, ever -- and felt its loss when I "finally" upgraded to macOS 10.12.4 last night.

With this new CSSfix.js, it lives on for another day! #notdeadyet #onward!

rix0rrr commented 7 years ago

Is there any plan for rolling the latest YouTube killer updates into the master GitHub repo?

I lost my working YouTube killer while trying to fix this and now I have to hunt around GitHub issue threads trying to find the latest set of scripts to use, and for some reason they're not "whatever is on master" :(

Fofer commented 7 years ago

@rix0rrr, this one is working for me: https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTubeXHR.js

Roy75117 commented 7 years ago

@Fofer Is there any way to get NEW safariextz or how to replace CSSfix.js which is provided in #issuecomment-290559617 ? Please tell me the detail process if possible. Thanks

Fofer commented 7 years ago

Is there any way to get NEW safariextz or how to replace CSSfix.js which is provided in #issuecomment-290559617 ? Please tell me the detail process if possible. Thanks

@Roy75117: All you should have to do, is paste the text string "https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js" into the "Plug-in to HTML5 Conversion Scripts" box in the General tab of ClickToPlugin's Preferences. That's what worked for me, at least.

poweruser82 commented 7 years ago

It's broken again :( schermata 2017-04-22 alle 14 37 06 I'm using these killers: https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTubeXHR.js

a-greyyyyy commented 7 years ago

I'm using these killers: https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTubeXHR.js

try disabling, then enabling the extension. that works for me if it stops working.

poweruser82 commented 7 years ago

It didn't work. I think it's related to UI changes of the site. It looks more material design than it used to be. Maybe I'm a "victim" of an A/B test. schermata 2017-04-22 alle 17 27 30

slrdc commented 7 years ago

It hasn't been working for me either with any of the YouTube killers for about a week or so.

poweruser82 commented 7 years ago

The killers still work with embedded videos. My workarounds at the moment are:

poweruser82 commented 7 years ago

Since the last couple of days it's working again with the usual interface and not the new one Google just introduced

ballo commented 7 years ago

Does the "fix" eliminate the "Flash" option for anyone else? I still use flash for livestreams and for when the html5 player fails.

poweruser82 commented 7 years ago

I don't see the "Flash" option anymore too. I don't miss it though.

Fofer commented 7 years ago

The "Flash" option went away awhile ago for me too. Now when I need to revert I just add the site to ClickToFlash's "Allow Flash" list, or disable the extension temporarily, and re-load the page.

ballo commented 7 years ago

Yeah, that's what I'm doing. It's a bit awkward

poweruser82 commented 7 years ago

Starting today, the killer seems to stop loading. The YouTube standard HTML5 video player is used

Fofer commented 7 years ago

FWIW, the killer's still working for me.

ballo commented 7 years ago

poweruser82 you shouldn't have html5 enabled anyway. You have to enable flash in the youtube prefs.

poweruser82 commented 7 years ago

@ballo disabling and enabling the extension fixed the problem. Thank you