Adblock for Opera

Many people live on Adblock. Even though many may think that Firefox is the only browser with Adblock, Opera can extend pretty far in terms of blocking certain content. (This will only work on Windows)

Update: As of Opera 9, this custom application is no longer necessary. This technique will do just fine.

The following is a normal page view of digg.com, without Adblock.

adblock_opera_digg_ads.gif

The following is a page view of digg in Firefox with Adblock enabled.

adblock_opera_firefox.gif

The following is a page view of digg in Opera with its unique ad-blocking abilities.

adblock_opera.gif

If you haven’t noticed, the ads and the ad container in Opera are gone, leaving more space for sensational viewing. If you don’t enjoy viewing ads or having huge ad containers wasting space on your monitor, then the following trick for Opera will do you good.

The Things You’ll Need

Opera does not support extensions. However, it has a variety of extensive built-in options that, with some tweaking, will do anything you want. To block all ad related content and containers with Opera, you’ll need the following assets.

Now Block Those Ads

This is an expanded version (with screenshots) of the readme.txt in the original zip for Opera Ad Blocker.

  1. In the Opera Ad Blocker zip, unzip OperaAdBlock.exe into a directory that you will not delete. It’s best to keep it in your Opera program directory for organization (e.g. C:\Program Files\Opera\).

  2. Extract filter.ini and menu.ini to your Opera profile directory. This could be C:\Program Files\Opera\profile\. If that directory doesn’t exist, it’s C:\Documents and Settings\USERNAME\Application Data\Opera\Opera\profile\.

    The filter.ini is the list of links to be blocked. It is by default a list obtained from Filterset.G as of today. If it doesn’t block something, you can add more to the end of the file (as we’ll see later).

    The menu.ini is to add a menu item when you right click on an image/object.

    adblock_opera_add.gif

    You’ll have to modify the paths to OperaAdBlock.exe and filter.ini in that file. There are 2 instances of “; -- EDIT BELOW --” — find each, and below that you will see

    Item, "Add to Block List" = Copy image address & Execute program,
    "C:/Program Files/OperaTools/OperaAdBlock.exe",
    "C:/Documents and Settings/USERNAME/Application Data/Opera/Opera8/profile/filter.ini"

    Change the bold file directories so they point to the place you unzipped OperaAdBlock.exe and filter.ini.

    If you already have a menu.ini in your profile folder (you are already modifying the menu), copy the last line of each section from this file and paste it under your original.

Blocking Ad Containers

Blocking ad containers involves editting a CSS sheet and setting the HTML id’s of those container elements to display: none;. If you have a few sites with ads you visit everyday, you’ll find this very useful.

  1. Go to opera:config in Opera. Click Author Display Mode, check User CSS if it isn’t already checked.

  2. Then click User Prefs (near the bottom), and for Local CSS File enter the address of a CSS file that you will edit and not delete. For Example:

    C:/Documents and Settings/USERNAME/My Documents/user.css
  3. Last step: create a CSS file in that directory with that name (in my example, user.css) and enter the id’s that you want to hide. This actually involves looking at the HTML source code of the page you are viewing, find the ad container, and the id. Most of the times (and on most well designed sites), the containers have id’s. For the ones that don’t, you can forget about it.

    Example: digg.com

    On digg’s home page, there is a Google Adsense ad on the top. After looking at the source code:

    <div id="google-broad"><div><script type="text/javascript"><!--
    google_ad_client = "pub-7489042062340760";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728×90_as";
    google_ad_type = "text";
    google_ad_channel ="4567327683";
    google_color_border = "F7F8FB";
    google_color_bg = "F7F8FB";
    google_color_link = "0033CC";
    google_color_url = "0066CC";
    google_color_text = "666666";
    //--></script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></div></div>

    The id is “google-broad”. So open up that CSS file that you created and enter

    #google-broad { display: none ! important }

    Do this for every ad container you think sucks and you will never see them again! Of course after each edit of the CSS file, restart of Opera is required (close it and open it again).

I realize that this works on Firefox as well, but being the Opera promoter I am, try Opera. It’s fast. And with this adblock technique, you can use Opera like you didn’t know what ads are.

post a comment16 Comments

  1. […] Download Adblock Socially bookmark via: […]

  2. 2April 9th, 2006nhoffman says

    thank you friend ror the info

    nhoffman

    del the first comment is an ass hole

  3. 3April 23rd, 2006Wizzard says

    For some reason I can’t make it work … folowed the instruction … but how does Opera recognize that it should “load” the menu.ini file?

  4. 4May 28th, 2006Joe says

    Should tell folks they need to down load 22megs of microcrap NET to get that adblock.exe to work.

    Maybe you should find a low resource user friendly solution.

  5. 5May 28th, 2006Oliver Zheng says

    I didn’t need to download .NET to use it, unless it came prebundled with Windows XP.

  6. 6June 20th, 2006Flavio Suárez says

    I used Opera´s content filtering since Opera 7 or so (w/o .NET)!
    Just go to http://nontroppo.org/wiki/BlockAdvertisements to learn about the many ways to block ads in Opera!

    I use the Filter.INI option + an updated ad servers list from

    Also, I use 3 user style sheets from
    http://members.chello.nl/b.kroonspecker/opera/styles/user/AdBlocker.css
    http://www.gozer.org/mozilla/ad_blocking/css/ad_blocking.css
    http://www.gozer.org/mozilla/ad_blocking/css/sites.css

  7. 7June 21st, 2006firefox_opera says

    Firefox certainly blocks the ads container with no extra work. I’m using this UserContent.css and it blocks nearly all ads and their containers.

  8. 8June 21st, 2006Flavio Suárez says

    AFAIK (but maybe I´m wrong) UserContent.css just don´t displays the ads, but don´t blocks the download.
    Opera´s Filter.INI does block the download.
    You can get the ad servers list from http://pgl.yoyo.org

  9. 9December 12th, 2006graham says

    I’ve tried this about 6 times.

    I cannot find my Opera directory under any of the Application Data folders. I’m the only person who uses my computer, and yet, there are five different variants of these user directories.

    Obviously, windows Search has been optimised NOT to find anything (especially where it was asked to look), so it’s not helping.

    So, I can’t edit the second part of the menu.ini line. (the exe is installed in the default place so it’s ok)

    Wouldn’t an installer be able to handle this sort of irritation?

    I love opera, but I hate ads!! Help!

    graham..

  10. 10December 13th, 2006Oliver Zheng says

    Opera 9 supports blocking ad images natively. Take a look at this technique.

  11. […] Resource : Browser Terbaru Opera Unjuk Gigi Opera releases 9.2 browser, adds “Speed Dial” Adblock for Opera Your Wii is lit up […]

  12. […] skrivnost Å¡t. 2: ne nikomur povedat, da znata blokirati oglase tako Opera, kot tudi IE. Da ne bo to sluÄ?ajno priÅ¡lo na uÅ¡esa tem preganjalcem Ä?arovnic in bodo zablokirali Å¡e ta dva brskalnika. Vse za dobro obiskovalcev. […]

  13. […] W wypadku tych drugich wybór jest bardzo prosty: Albo używam przeglÄ…darki z automatycznym blokowaniem reklam (oto kilka propozycji dla: Mozilli, IE i Opery (powinieneÅ› już to wiedzieć, ale Justin Case mówi[Ä™]: „FireFox to też Mozilla”) - panu Danny’emu Carltonowi proponujÄ™ zatem zablokowanie wszystkich trzech przeglÄ…darek, ponieważ do każdej istnieje odpowiedni plugin!), albo… nie wchodzÄ™ na stronÄ™. Szkoda mi nerwów, po prostu wyskakujÄ…ce np. na onecie reklamy sÄ… tak denerwujÄ…ce, że proÅ›ciej mi nacisnąć krzyżyk w przeglÄ…darce, niż szukać go w reklamie. WrócÄ™ później, z blokadÄ… — albo wcale. Dlatego nie potrafiÄ™ do koÅ„ca zrozumieć intencji wÅ‚aÅ›cicieli takich stron. Czy naprawdÄ™ chcÄ… odstraszyć użytkowników? ZniechÄ™cić ich? Zdenerwować? Pokazać „inne strony da siÄ™ czytać, ale nasze za to majÄ… fajniejsze reklamy!”?! […]

  14. 14January 29th, 2008nimd4 says

    graham, type in the Start Menu, Run…

    %PROGRAMFILES%\Opera 9\profile

    if your Opera profile isn’t in the %APPDATA% folder.

  15. 15March 25th, 2008Les says

    Just use Privoxy.

  16. 16May 12th, 2008enzyte says

    best price

Post a Comment

Name and email are required (website is optional). Basic HTML is enabled.

Your email address is not revealed to anyone.