Skip navigation.

Bits and Pieces

Opera tips, music, anime, my life experiences.

My Personal Ad Blocking CSS

, , ,

This is the style I use in conjuntion with My Ad Blocking urlfilter.ini to remove "white space'.

Step 1: Go here and find your User CSS directory.

Step 2: Save My Personal Ad Blocking CSS

Step 3: Restart Opera

Step 4: Select Ad Block: BH from the View > Styles menu.

OPTIONAL: Here's a button to call the button

Using Opera Voice to remind you what all those Internet abbreviations stand for.Fukken Saved "extension" for Opera

Comments

avatar
You know using CSS you don't block anything, you just hide it.

By LorenzoCelsi, # 21. February 2008, 10:53:25

avatar
If the image/embed or the element containing the image/embed are blocked Opera does not download or display the image/embed/element that for me constitutes a block.

Theres some debate regarding this and I've yet to see an official comment from Opera ASA but the tests I've done support this (Packet sniffing, cache monitoring).

Of course this varies depending on browser, Firefox for example simply hides the image/embed or at least that was the case when Stylish users were requesting Opera style CSS "blocking".

Of course for me the CSS blocks are used mainly to clean up containers left behind after I remove them using My Ad Blocking urlfilter.ini. So either way the CSS achieves what the urlfilter can't achieve on its own.

By BleedingHeart, # 21. February 2008, 11:42:35

avatar
You can make this simple test.
1. empty your browser cache.
2. load a page with "CSS-blocked" objects.
3. see what is in the cache (of course you can't find containers, only images, JS external files, etc)

I don't know ANY way to tell the browser "do not load this object" via CSS. From what I know you can only change the "display" property.

To block objects you must use the "ini" file, otherwise it would not make sense to add the "block content" feature to Opera, which does not write any CSS for the obvious reason that would not block anything.

Same for Firefox, you need the ADBlockPlus extension to block objects from loading, using CSS you can only hide elements.

By LorenzoCelsi, # 21. February 2008, 12:29:38

avatar
I have done these tests as well as packet sniffing, when an image/embed is "blocked" (display:none) Opera makes no attempt to download the image/embed. Its not in the cache, when the CSS block is removed (from the style menu) Opera then attempts to download the image/embed.

This is done using the display property, I class this as a successful block.

This is not so much a CSS thing as a browser choice, your simple test and packect sniffing say Opera "blocks" using display:none.

To block objects you must use the "ini" file, otherwise it would not make sense to add the "block content" feature to Opera, which does not write any CSS for the obvious reason that would not block anything.



The "block content" feature has been in Opera for a long time just without the shine, perhaps even longer than the custom CSS feature. To suggest Opera wouldn't add features if it meant duplication is certainly strange considering there are several ways to search (address bar, search bar, hotclick menu), several ways to call bookmarks (menu, panel, nicknames, speed dial) several ways to change settings (Preferences, opera:config, .ini file) and several ways to block content (urlfilter.ini, CSS, user JS, proxys).

By BleedingHeart, # 21. February 2008, 12:36:59

avatar
Guess what, you are right.

Adding "display:block" stops Opera to load the image.
That is weird in my opinion for serveral reasons but hey, thanks, I've learned something new today :smile:

I never tested the CSS blocking in depth because the ini file technique makes more sense in my opinion since it allows to use more "generic" filters, for example to block external JS files from loading and executing and/or the adservers as root, regardless what comes from there.

I never tried to mix the 2 things mostly because I am lazy and I find already annoying to debug the ini filter.

About Opera multiplicating features yes, you are right and I think it should be re-designed because on one side it allows the user to customize the browser more, on the other side it makes the browser a little cluttered.

Since we are speaking of Opera, I'm having problems with flash objects, it happens that Opera freezes for a while or even hangs when I load a page with things like youtube videos embedded.
Have you ever seen this behaviour?

By LorenzoCelsi, # 21. February 2008, 13:14:53

avatar
Personally I use the .ini for sites and servers that I want to shut out completely and the CSS for cleaning up the "white space". Plus it tends to get some things that a more generic .ini wouldn't catch although you could make it. :smile:

By BleedingHeart, # 21. February 2008, 13:25:50

avatar
Updated

By BleedingHeart, # 25. February 2008, 14:10:06

avatar
Updated

By BleedingHeart, # 2. March 2008, 02:12:10

avatar
Updated

By BleedingHeart, # 3. March 2008, 05:32:29

avatar

Since we are speaking of Opera, I'm having problems with flash objects, it happens that Opera freezes for a while or even hangs when I load a page with things like youtube videos embedded.
Have you ever seen this behaviour?



On Linux I've seen too many problems with flash to mention, on Windows I've only experienced that when duplicate plugins are detected.

By BleedingHeart, # 5. March 2008, 05:52:22

avatar
Updated

Cleaned up a lot of news and torrent sites.

By BleedingHeart, # 5. March 2008, 05:54:28

avatar
Updated

By BleedingHeart, # 11. March 2008, 13:57:22

avatar
Updated

By BleedingHeart, # 17. March 2008, 05:46:19

avatar
Updated

By BleedingHeart, # 29. March 2008, 16:23:56

avatar
Updated

By BleedingHeart, # 13. April 2008, 06:34:24

avatar
Updated

By BleedingHeart, # 18. April 2008, 06:56:00

avatar
Updated

By BleedingHeart, # 11. May 2008, 08:32:56

avatar
Updated

By BleedingHeart, # 19. May 2008, 19:48:42

avatar
Updated

By BleedingHeart, # 21. May 2008, 07:57:04

avatar
Thanks a lot for the CSS!

I don't use .ini, since I am using hosts file for that and it applies to all the browsers, but style sheet is great for removing white spaces left on screen.

By tambov_wolf, # 25. June 2008, 16:25:06

avatar
Np. Updated

By BleedingHeart, # 29. August 2008, 10:25:08

avatar
Thanks, that helps a lot.

By rams78, # 5. September 2008, 08:27:02

avatar
Thanks.Really good working.

By ZAHEK, # 11. September 2008, 06:24:55

avatar
np and thanks guys.

By BleedingHeart, # 11. September 2008, 11:19:30

avatar
:cheers:

By ZAHEK, # 11. September 2008, 12:02:32

avatar
hi

Thanks.
Very good.

It is possible to add :confused:
Block commercials links inside google search result page.

Thanks.:headbang:

bye


By snf, # 29. September 2008, 16:43:13

avatar
Give me an example of one you still see and ill have a look.

By BleedingHeart, # 29. September 2008, 17:52:24

avatar
Updated

By BleedingHeart, # 24. November 2008, 08:10:33

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Please type this security code : c1d71e

Smilies