Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

uBlock fails to block YouTube ads when used in conjunction with ClickToFlash in Safari #1539

Closed
briankendall opened this issue Sep 10, 2015 · 27 comments

Comments

@briankendall
Copy link

uBlock consistently fails to block YouTube ads when I use it in conjunction with the ClickToFlash plugin. I currently have ClickToFlash set up so that YouTube is whitelisted for various reasons I won't go into here. However in this configuration YouTube ads are not blocked. I've confirmed that if I disable ClickToFlash the issue goes away, but I'd like to keep using ClickToFlash.

Here's an example of a YouTube video that plays an ad with both plugins loaded: https://www.youtube.com/watch?v=vjW8wmF5VWc

If ClickToFlash doesn't have YouTube.com whitelisted, the ad will also play if you right-click the video and select "Load flash".

I know that conflicts between different pieces of software can be difficult to resolve, but I figured it was worth mentioning. Also, for what it's worth, Adblock Plus doesn't have this issue.

Safari 8.0.8
OS X 10.10.5

@publicarray
Copy link
Contributor

I take it that you are using the flash player. Could you try it with youtube's HTML5 player?

@Apreche
Copy link

Apreche commented Sep 10, 2015

I think this issue might be more widespread. Perhaps Google/YouTube changed something. Starting one, at most two, days ago, YouTube ads aren't blocked for me at all. I'm mostly using HTML5 in Chrome on Windows 7 and 10.

@publicarray
Copy link
Contributor

@Apreche Google changed something in Chrome's webRequest API a few days ago. Please see gorhill/uBlock#675 (comment) and gorhill/uBlock#594. I the issue is fixed in the canary build, chrome issue#526413

@briankendall
Copy link
Author

I don't think that issue with Chrome affects Safari. If I turn off ClickToFlash uBlock stops 100% of the YouTube ads.

@publicarray I already have YouTube's HTML5 player activated. However it seems that ClickToFlash causes all of the html5 capable videos to use the Flash player instead.

I'm starting to get the impression that the main culprit here is ClickToFlash, as it's altering the behavior of YouTube and uBlock even when I have it configured so that youtube.com is on the whitelist. I'd rather have it just not affect YouTube at all, in which case I suspect it'll stop interfering with uBlock. But I'm not ready to disable it yet -- being able to stop Flash on every other website is too important!

@publicarray
Copy link
Contributor

@briankendall My comment above was directed to Apreche and like you pointed out it's not relevant to your issue.

I Installed ClickToFlash and I noted that there are two versions. Can you tell me which version are you using and the version number? I installed ClickToFlash 3.1.6 by Marc Hoyois. The extension has the ability to convert popular flash players to HTML5. Using default settings I don't get any ads.

Edit
If I put "https://www.youtube.com" into the box "allow flash on these sites" than yes ad can show. This is because extensions don't have the ability to modify requests from within flash and the extension is basically forcing to load flash. I get the message "Missing plug-in" because I don't have flash installed.
It seems ClickToFlash doesn't have a whitelist as such

Edit 2
You are probably better off to open an issue at hoyois/clicktoplugin

@publicarray
Copy link
Contributor

To temporally disable ClickToFlash on a specific domain you have to enable it in the shortcut menu, navigate to a youtube video, right click and choose "Disable/Enable ClickToFlash"

@briankendall
Copy link
Author

@publicarray I am using ClickToFlash 3.1.6 by Marc Hoyois. So the reason I'm trying to whitelist youtube.com is:

  • When ClickToFlash is enabled and replaced Flash with an html5 player, it uses QuickTime instead of YouTube's built-in html5 player
  • This disables certain YouTube features I like, including clickable elements, subtitles, and annotations.
  • Most importantly, frequently the video will simply fail to play back with no error message, and the only way to fix it is to restore the normal player anyway.

So what I'd like is to have YouTube behave normally as though ClickToFlash isn't enabled, but have it enabled for every other site. Unfortunately when I whitelist a domain with ClickToFlash, it forces flash to be used, as you pointed out. I have to disable it entirely for YouTube's html5 player to come back, meaning it's disabled for every other site as well.

Ordinarily this isn't that big of a deal, because using the flash player instead of the html5 player isn't a deal breaker for me (though I do prefer avoiding flash when possible), but it does cause uBlock to not block the video ads.

I've tried ClickToPlugin but it has the same issue -- it forces flash on YouTube and prevents uBlock from stopping video ads.

However, I'm not sure what you said about it being impossible to block what's going on in Flash is actually true, because AdBlock Plus does stop YouTube video ads in this circumstance. So I've been using ClickToFlash + AdBlock Plus successfully. I'd much rather use uBlock, though, particularly for the lower memory and CPU footprint. Granted if ClickToFlash had a proper option for disabling itself on a per-domain basis, that would be even better.

@briankendall
Copy link
Author

@publicarray Okay, nevermind what I just said -- I just tried ClickToPlugin, and was able to configure it so that YouTube has its default behavior and uses its own html5 player by deleting the YouTube killer from its list of conversion scripts. The weird thing is that I tried this last night and it didn't work, and now suddenly it is.... not sure what I did wrong. But the good news is that now I can use uBlock and still block flash and other plugins.

@mustii82
Copy link

The new Ads on youtube supports html5 now so a flash blocker is no more a youtube ads guard anymore...

@publicarray
Copy link
Contributor

It is my understanding that the issue was solved by deleting the YouTube killer script and restarting safari.

a flash blocker is no more a youtube ads guard anymore

You can use uBlock Origin to block YouTube's HTML5 ads. So I don't see what you mean.

@mustii82
Copy link

yes but flash makes a cpu overhead and kill my battery life many people need an better solution then just use flash instead

@publicarray
Copy link
Contributor

an better solution

Many websites use HTML5 players or WebGL, so you can uninstall flash (http://occupyflash.org/) or if you are using safari you can install the ClickToFlash extension. I still don't see what you are trying to achieve.

@alvinkatojr
Copy link

I have been following along but I can't seem to get the ads blocked from safari. What exactly are the steps required after installing click to plugin for permanently blocking these pesky youtube ads?

@publicarray
Copy link
Contributor

steps required after installing click to plugin for permanently blocking these pesky youtube ads?

  1. Install uBlock
  2. Install Click to Plugin
  3. Open Click to Plugin preferences
  4. Remove killers/YouTube.js from plug-ins to HTML5 conversion scripts
  5. Restart Safari

Edit add video showing the steps: https://youtu.be/6YGC7ivJYlw

@alvinkatojr
Copy link

I did that @publicarray and here's how youtube looks like on Safari
screen shot 2015-10-27 at 7 20 05 pm

Screen's frozen, I can't play nothing.

@publicarray
Copy link
Contributor

@alvinkatojr What version of safari are you using? are there any errors in the console?

http://hoyois.github.io/safariextensions/clicktoplugin/help.xhtml#faq_youtubesafari8

@alvinkatojr
Copy link

@publicarray Am using the latest version of safari. Looking at the link now and unfortunately nothing over there makes sense.

@publicarray
Copy link
Contributor

@hoyois can I invite you to the conversation? the short version starts at #1539 (comment)

@alvinkatojr can you look in the console and paste the results?

  1. Open Safari and choose Safari > Preferences > Advanced. Then select the checkbox Show Develop menu in menu bar.
  2. Choose Develop > Show Error Console.

the latest version of safari

9.0.1

@alvinkatojr
Copy link

Hi @publicarray. Running the latest, 9.0.1.

Have the console open as well.

@publicarray
Copy link
Contributor

@alvinkatojr thanks,

Have the console open as well.

When you try to watch a youtube video is there anything in the console? if yes can you copy and paste the contents?

@alvinkatojr
Copy link

Here's how it looks like.
screen shot 2015-10-28 at 5 28 54 am

@publicarray
Copy link
Contributor

I appears safari is still loading the flash player. To reset the settings I recommend you

  1. backup uBlock settings: choose ublock icon > ublock 0.9.5.2 > backup to file > right click > save page as... > call it 'uBlock-backup.txt' and change the format to 'page source'
  2. uninstall ublock and click to plugin: choose Safari > Preferences > Extensions > ExtentionName > uninstall
  3. restart safari
  4. follow the steps at uBlock fails to block YouTube ads when used in conjunction with ClickToFlash in Safari #1539 (comment)

@alvinkatojr
Copy link

Thanks @publicarray that works perfectly for other videos except for the ones that am currently watching on the WRC channel.

screen shot 2015-10-28 at 6 02 51 am

That's what I get and here is the video in question: https://www.youtube.com/watch?v=klPGwvdWnsQ

@publicarray
Copy link
Contributor

Ahh this is because safari doesn't support WebM: https://www.youtube.com/html5, you can try google chrome instead.

@alvinkatojr
Copy link

I see. That explains it. But what's strange is that when I adjust some of the settings for click to plugin then the video plays but with ads. Real strange business.

I guess its back to firefox for these kind of videos.

Thanks for the help @publicarray!

@publicarray
Copy link
Contributor

when I adjust some of the settings for click to plugin then the video plays but with ads.

Than your are playing the video using flash not HTML5. uBlock dosn't touch plug-ins thus you see ads.

@alvinkatojr
Copy link

I see. I guess. I will leave things as they are then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants