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

[Safari] remove site-patch injection at the expense of blocking YouTube Flash ads? [Opinions/input wanted] #633

Closed
chrisaljoudi opened this issue Jan 28, 2015 · 4 comments

Comments

@chrisaljoudi
Copy link
Contributor

Right now, µBlock for Safari injects a site patch on YouTube pages.

The reason for this is the fact that when using Flash, the requests that are sent to "get" the ads aren't capture-able with the standard events in Safari. However, as far as I can tell, this is not true when using the HTML5 player.

YouTube now defaults to using the HTML5 player.

What this means is: it is possible to remove the Safari-only site-patch injection infrastructure (along with the YouTube site-patch itself) from µBlock.

People who have an HTML5-capable Safari would successfully have the ads blocked. The YouTube ad-blocking won't work, however for those with an old version of Safari — and those who're using Flash on YouTube in general.

Thoughts?

Removing the site-patch injection would positively contribute to the coherence of the codebase, and it removes the overhead (though arguably quite tiny) of checking for a site-patch at each navigation, as well as the overhead of injecting the site patch into YouTube pages.


I can confirm that YouTube ad-blocking works great on Safari 8 with a modified µBlock that doesn't include site patches.

@chrisaljoudi chrisaljoudi changed the title [Safari] Remove site-patch injection at the expense of blocking YouTube Flash ads [Safari] remove site-patch injection at the expense of blocking YouTube Flash ads? [Opinions/input wanted] Jan 28, 2015
@gorhill
Copy link
Contributor

gorhill commented Jan 29, 2015

twitch.tv still uses Flash. That's one I know. (I think it came up in the reddit)

@chrisaljoudi
Copy link
Contributor Author

@gorhill right, but we never had a twitch.tv site-patch. I don't use the site, so I'll have to look into how to make a patch for it and if it's reasonable.

@chrisaljoudi
Copy link
Contributor Author

@Deathamns yep, I understand. I'll have to do a bit of a survey on the top n sites to see how many of them use Flash and have ads.

@chrisaljoudi
Copy link
Contributor Author

twitch.tv is a mess — there doesn't appear to be a reasonable way to block ads when using the Flash player (until the Safari Extension API gives access to requests made by Flash), and the HTML5 player seems to depend on Google's IMA (Interactive Media Ads) stuff.

As mentioned above, YouTube now defaults to HTML5. 113b7dd removes site patches from the Safari port, reducing overhead and increasing consistency with rest of codebase. µBlock for Safari will no longer block YouTube ads when using Flash (which should only happen when using an outdated browser).

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

No branches or pull requests

2 participants