Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I don't mind the advertisements on the right side or the small banner inside Youtube videos, but the advertisements shown before a video is played are really annoying.

How can I disable those advertisements? I know I can install AdBlock Plus for Firefox, but that also disables all other advertisements which is not fair for webmasters. If that's the only way to get rid of the advertisements, Google seriously did something wrong.

share|improve this question
    
Have you tried the add-ons from How To Block Youtube Ads? I used that site for Firefox and for Chrome, worked perfectly. –  Pio89 Sep 13 '13 at 17:52

4 Answers 4

After installing AdBlock Plus, change the extension settings to allow everything except the Youtube video ads.

share|improve this answer
1  
It would be better if you could expand your answer to state what the video ads are for the filter to enter. What particular text or phrase if need be –  Eight Days of Malaise Aug 28 '11 at 5:53

You can use Youtube options for Google Chrome, under video options in the settings enable "Hide in-video ads and annotations"

Hide the in-video ads

share|improve this answer
    
Do you know a similar tool for Firefox? Also, does the option "Hide in-video ads and annotations" affect ads played before videos? –  Lekensteyn Feb 9 '12 at 15:51
    
@Lekensteyn Yes that's what the option means; removes ads before videos. No I don't know a similar tool for Firefox. The author used to have a Firefox extension but they removed it. spoi.com/software/yto –  phwd Feb 9 '12 at 16:08
    
Thanks for your pointer, I've created a small script that does exactly what I want without bells and whistles. webapps.stackexchange.com/a/23745/11016 –  Lekensteyn Feb 9 '12 at 16:53
up vote 7 down vote accepted

Based on the extension as posted by @phwd, I've created a simple script that is designed to do exactly one thing: remove in-video advertisements.

Simple installation instructions for Firefox

  1. Go to https://addons.mozilla.org/firefox/addon/greasemonkey/ and press the green installation button
  2. After installation of the add-on, restart Firefox
  3. Open http://lekensteyn.nl/files/Remove_in-video_Youtube_adverts.user.js and press the Install button.
  4. Profit!

Other browsers

Instructions for installing this script across various browsers can be found on http://stackapps.com/tags/script/info

Firefox with Noscript

If you're using Firefox and have NoScript installed, you can use the below surrogates. You have to add two settings to about:config, both of type string.

  1. Key: noscript.surrogate.removeVideoAdsYoutube.sources
    Value:

    !@*.youtube.com

  2. Key: noscript.surrogate.removeVideoAdsYoutube.replacement
    Value:

    (function(){try{var o=ytplayer.config.args,i;for(i in o){if(o.hasOwnProperty(i)&&/^(afv_)?ad/.test(i))delete o[i]}}catch(e){}var a=document.getElementById("movie_player");if(a){var b=a.cloneNode(!0); b.setAttribute("flashvars", a.getAttribute("flashvars").replace(/&(afv_)?ad[^&]+/g,"")); a.parentNode.replaceChild(b,a)}})()

If you want to make your own surrogates, have a look at http://hackademix.net/2011/09/29/script-surrogates-quick-reference/

UPDATE (02/24/14): fixed noscript surrogate code. Greasemonkey script still broken at this date.

share|improve this answer
1  
FYI: this broke at some version, the ads appeared back a month ago or so. –  Lekensteyn May 9 '13 at 10:08
1  
For me, since I used your script, I never saw ads, even now –  Theta30 Aug 6 '13 at 1:34
1  
@Theta30 Are you using other extensions or userscripts that may do that? –  Lekensteyn Aug 6 '13 at 8:40
    
Note: I have looked at fixing the userscript, but an issue remains: when navigating to a new video, the ads are still visible. Attempts to fix that (overwriting a getter/setter on ytplayer) introduced other sources of bugs. –  Lekensteyn Mar 3 at 17:30

Just refresh the page and video overlay ads won't load. The only problem with this is , that it don't work always.

Sorce : Lifehacker

share|improve this answer

protected by Community Sep 13 '13 at 19:09

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.