My programs for Opera

AdBlock for Opera - analogue of «Adblock Plus: Element Hiding Helper»

adblock_setup.zip (130Kb)

UserJS-only version: adblock.js (recommended for Opera 10.5)
Use Alt+Shift+A for blocking ads, Alt+Shift+B for exact blocking and Alt+Shift+U for unblocking. Press Alt+Shift+E for editing styles.
From version 1.3.12, you can use Shift+Click to block many elements.

Buttons are available in the Readme.html. Video.

This tool used for easily blocking of page elements (and text ads). You simply select the element you want to be block. The element hiding rule is generated and added to localStorage/cookies.

Classic version
Copy and select the menu in Ctrl+F12-Advanced-Toolbars. Close Opera, start AdBlock_setup.exe, specify the folder of Opera.
Enable style AdBlock+ in menu View-Style. Install adblock.js as usually.
Now you can block an element from the context menu of page, or having used button AdBlock+.


P.S. Rip.js it's good thing, but the page at first is loaded and only contents then disappear. On my connect, it looks ugly.

Compatibility with Opera 10.5Copying text with formatting to clipboard and Autocopy.js

Comments

RX8 Monday, December 15, 2008 9:34:47 PM

Thanks, I test it and it works fine. Can you tell me in which file are kept the blocked sites, so i can remove something i put there by mistake.

A.RuzanovLex1 Tuesday, December 16, 2008 8:41:35 AM

opera:about->User CSS directory->Adblock+.css

chris34 Tuesday, December 16, 2008 10:46:22 AM

doesn't work with 10 alpha?

A.RuzanovLex1 Tuesday, December 16, 2008 11:20:52 AM

Work without problem.

A.RuzanovLex1 Monday, December 22, 2008 12:20:27 PM

Update
+ Added support nth-child
- Fixed some bugs

each Sunday, December 28, 2008 9:12:08 PM

This works great-especially after the last update smile

Any way to block more than one elements at the same time?
A way would be to hold down a button and clicking on the elements to be removed. When finished the button is released and the popup dialog comes up with all the blocked elements. This is only a suggestion of course (more coming up smile ), you can probably come up with something more usable if you do decide to do this.

Also how about giving it more Platypus capabilities like:
1. isolating an element and showing only that
2. widening the element
3. changing the size of the font etc
I don't know if all of these can be done with css, platypus uses javascript.

Of course these are all ideas, if you do however manage to do this then it will be one of the few times that an Opera addon works better than a Firefox extension, as Platypus relies on Greasemonkey which on my last check kicks in only when the page finishes loading.

Anyway thanks again, even if you don't do any of these I use a lot of your other addons already, one of main reasons I managed to avoid switching to Firefox for quite some time smile

Unregistered user Wednesday, December 31, 2008 4:12:07 PM

Anonymous writes: How to block flash elements??

Unregistered user Thursday, January 1, 2009 9:52:14 AM

Anonymous writes: Many thx for this excellent aid to easy the browsing. I've have the same question, how to block flash driven elements. Unfortunately a click on element produces a divert or pop-up. If possible, check it at next update. Also an integrated edit-function for Adblock.css+ handling (removing unused links after unblock) would be appreciated in the future.

Miladin MiladinoskiEagleMKD Friday, January 2, 2009 4:05:31 PM

How can I make this work on GNU/Linux? knockout

A.RuzanovLex1 Friday, January 2, 2009 7:10:40 PM

Any way to block more than one elements at the same time?


Nope.

how to block flash driven elements.


Why you do not use standard blocker for this purpose? Css not the best way for blocking object's.

removing unused links after unblock


?

White_Eagle
Source codes are open. Welcome.

Sk0l Friday, January 9, 2009 12:17:57 AM

AWESOME! yikes

qazokm123 Tuesday, January 20, 2009 1:23:29 AM

BEST of the BEST .!
with widening and narrowing of element function will be ultimate.

n8chavez Wednesday, January 28, 2009 10:32:39 PM

Is there any way to add whitelist capabilities to this. It works great, but there are some sites that look weird with the CSS enabled. Adding them to a whitelist would solve that.

A.RuzanovLex1 Thursday, January 29, 2009 11:56:24 AM

You do not understand something. Css works only on a concrete site, not global.

each Saturday, February 14, 2009 8:11:07 PM

Is there a limit to the number of lines that can be added?
The blocking stopped working after a while. After some testing-
moving the
{ display: none !important }

line up
it seems that the last line that works is 99.
Is that right?And if yes is there a workaround?

A.RuzanovLex1 Saturday, February 14, 2009 8:50:01 PM

Is there a limit to the number of lines that can be added?


Afaik - no.

last line that works


Maybe wrong css-rule? You can copy it here or on my mail?

each Saturday, February 14, 2009 10:35:31 PM

You were right there is no limit it was some bad rules, the ones below which I found throught the error console.
HTML > BODY > DIV[id="width"]:nth-child(2) > DIV[id="main"]:nth-child(3) > DIV[id="trunk"][class="threeCol"] > DIV[id="content"][class="clear"]:nth-child(2) > DIV[id="col1"]:nth-child(2) > rdf:RDF > rdf:Description > DIV[id="col3"]:nth-child(5),
HTML > BODY > DIV[id="width"]:nth-child(2) > DIV[id="main"]:nth-child(3) > DIV[id="trunk"][class="threeCol"] > DIV[id="content"][class="clear"]:nth-child(2) > DIV[id="col1"]:nth-child(2) > rdf:RDF > rdf:Description > DIV[id="col2"]:nth-child(4),


There were times however when the filtering didn't work without these two rules in the file and it would work again if I reduced the css file to 99 lines,thats why I didn't think to check for bad rules as I checked for file length first.

I couldnt't pinpoint the exact reason, a restart seemed to fix it most of the times or removing a rule with the text editor and readding it throught the GUI.It must be an Opera bug.If it happens again and I manage to reproduce it I will post again.

Father LukeFatherLuke Saturday, February 28, 2009 1:55:56 PM

How come the elements show back up when the page is refreshed?

A.RuzanovLex1 Saturday, February 28, 2009 4:57:26 PM

FatherLuke
«Enable style AdBlock+ in menu View-Style.»

Father LukeFatherLuke Saturday, February 28, 2009 10:30:37 PM

D'oh! Works perfect. Many, many thanks!

- -
Okay,
Father Luke

Piet Piraat Friday, March 6, 2009 9:55:20 PM

Too bad, these element hiding rules always work globally, not site specific, as they should be.

A.RuzanovLex1 Friday, March 6, 2009 11:04:51 PM

Piet Piraat
Dude, install adblock.js. After that all rules will include «HTML[class="my.opera.com"] > BODY[id="myopera"] > »

Piet Piraat Saturday, March 7, 2009 1:43:40 AM

Thanks Lex1,

It's quite a hassle to get something working in Opera, I'm sure when Opera would allow easier things like this, and listen to their customers crying for some other stuff like remembering Zoom Levels per site, and something more automatic and easy like AdBlockPlus, Opera would snoop away FF users quite fast, while now its userbase is just dying out....

Unregistered user Sunday, April 5, 2009 3:42:20 PM

Aloha writes: Does it need JavaScript always enabled? Which urlfilter.ini goes best with it? Thank you!

Unregistered user Monday, April 6, 2009 6:42:50 AM

Petr_K writes: Hallo Lex, this application doesn't work with new Opera ver. 10 - 1413. An update or advice how to continue using Adblock, would be necessary. Be so kind and check it. Many Thanks in Advance Petr - CZ

A.RuzanovLex1 Monday, April 6, 2009 7:05:18 PM

Updated.

Which urlfilter.ini goes best with it?


If you ask such question, means you completely do not understand for what it it is necessary.

Unregistered user Friday, April 17, 2009 8:01:03 PM

Anonymous writes: Is there a way to have this button on my toolbar but instead of the Show hidden popup menu text, it would "say" only an icon a blocking sign, you know, a circle with a line through it? That would look nicer.

Unregistered user Friday, April 17, 2009 8:38:25 PM

Anonymous writes: Nevermind, I managed to do it, the link is: opera:/button/Show%20hidden%20popup%20menu,%22AdBlock%20Menu%22

A.RuzanovLex1 Sunday, April 19, 2009 2:56:50 PM

How can I make this work on GNU/Linux?


Use UserJS-only version.

Viewyviewy21 Wednesday, April 29, 2009 5:36:42 AM

Been using Adblock on Opera 10 for a while; thank you very much for such a useful script!

Now if someone can fix the paths for the new profile setup in the 1413 build, I'm sure people who like to keep up with the newest snapshots would be very happy. =)

Unregistered user Tuesday, May 12, 2009 12:27:10 AM

Anonymous writes: Thanks a million for this fantastic tool, Dude! Have searched for this for years! Love it, thank you!

Unregistered user Sunday, June 14, 2009 9:04:00 PM

MacUser writes: Thank you, Lex, for what you have done here. It is a shame that Opera doesn't provide Widget versions of Adblock Plus, Adblock, or NoScript. Really, they are so far behind Firefox extensions they are shooting themselves in the foot. Users are way beyond wanting to block entire websites. Websites are too complicated and have too many elements, and if you block the whole site, it becomes unusable. I need this for a Mac, running an older OS. I wish there was some user-friendly GUI instead of having to hack it out in files like this, which is great when it's the only solution we have, but not much of a solution compared to Firefox extensions which can be easily installed and uninstalled. Also, on Firefox, my Adblock Plus list of blocked sites (and whitelisted ones) auto-updates every 5 days. I would like nothing more than for Opera to get its act together and make some official version of NOSCRIPT and ADBLOCK. I would prefer never to use Firefox again as it is a bloated memory hog. To me, Opera's lack of useful widgets reminds me of kiddies playing in kindergarten. Take a look at Firefox's vast list of extensions and compare it to Opera's and there is no comparison. Get your act together, (official) Opera developers. Meanwhile, Lex, if you make a Mac version of this, I would be grateful. Maybe it will hold me over until Opera makes an official version. One more question: In addition to traditional blocking and whitelisting of URLs, scripts and images, do you know if Opera allows for simple blocking of elements? To be specific, here are some element examples: !------------------------Element hiding rules------------------------! ##.Ads ##.AllAds ##.FlatAds ##.GOOGLE_AD ##.PanelAd ##.RectangleAd ##.SidebarAd ##.TextAd ##.ThisIsAnAd ##.adlnklst !~joinmyband.co.uk!!.ads:not(body) ##.ads:not(body):not(\[style="border-top: 1px solid rgb(204, 204, 204); font-size: 13px;"]) Thanks!

Molkio Monday, June 15, 2009 2:26:06 PM

It's perfect!

Thank you very much my friend.

A.RuzanovLex1 Tuesday, June 16, 2009 5:39:43 PM

«if you make a Mac version of this»
-> UserJS-only version: adblock.js

Unregistered user Tuesday, June 16, 2009 11:08:42 PM

Dude writes: Does not work anymore with Opera 10.00 beta build 1551 or Opera 'Unite' build. :-( Is there a way to fix it? And what about the place where the userjs-only version stores its filtering rules?

A.RuzanovLex1 Wednesday, June 17, 2009 5:08:16 PM

Worked without problem.

Molkio Wednesday, June 17, 2009 5:29:58 PM

Lex1,what do you think about Adsweep?

Here:
http://spedr.com/2xht3

Unregistered user Thursday, June 18, 2009 9:03:23 PM

Anonim writes: @Lex1. Opera Unite says 'this extension isn't registred'.

Tom LongiMacThere4iAm Monday, June 29, 2009 9:24:20 PM

Lex1, where does the UserJS-only version store its settings?

A.RuzanovLex1 Tuesday, June 30, 2009 8:20:07 AM

Opera Unite says 'this extension isn't registred'.


Check path for «text/adblock» in Ctrl+F12->Advanced->Downloads.

where does the UserJS-only version store its settings?


In cookies. Opera does not have another store.

Unregistered user Tuesday, August 11, 2009 7:50:22 AM

Anonymous writes: where can I locate the registry key for the adblock+ context menu item ?

A.RuzanovLex1 Thursday, August 13, 2009 1:29:12 PM

Opera don't use «registry key». Path to menu.ini is here: opera:config#UserPrefs|MenuConfiguration

Unregistered user Friday, August 14, 2009 5:19:53 AM

Anonymous writes: Thanks for your help and thanks for adblock+ and flashblock.

Unregistered user Sunday, August 16, 2009 7:07:32 PM

Anonymous writes: Is it possible to re-enable flashblock for a site such as youtube? Tried reinstalling script,empty cache,delete cookies no luck.

Unregistered user Tuesday, August 18, 2009 6:42:15 AM

Anonymous writes: please disregard last posting I found my answer here http://my.opera.com/Lex1/blog/flashblock-for-opera-9?startidx=300#comments Anonymous # 25. June 2009, 11:34 Anonymous writes: but the firefox flash blocker blocks the video in youtube... Lex1 # 25. June 2009, 20:53 Do not install FlashBlocker-white-list.js Re-enable userjs in options of the site.

Unregistered user Saturday, August 22, 2009 6:04:09 PM

chromax writes: Hi, I use opera on an eeePC with Xandros. The .js is loaded, but without the adblock.css style it doesn't work.

Unregistered user Thursday, September 3, 2009 12:24:07 PM

chromax writes: got it. The unblocking "Shift+Alt+U" doesn´t do anything. What should happen normaly? In the Adblock.js is this keystroke not mentioned... A little bit more support with an FAQ or something would be helpful.

Unregistered user Thursday, September 3, 2009 12:30:21 PM

chromax writes: For everyone who also not know how to unblock. Go to: Tools > Advanced > Cookies Search your blocked site delete the cookie with the word "adblock" in it.

A.RuzanovLex1 Tuesday, September 8, 2009 2:25:03 PM

Update
Userjs-only version now supported hotkey Alt+Shift+L (for unblocking latest element) and can be started from opera buttons.
Item, "Block element" =Go to page, "javascript:navigator.ujs_adblock.block();",,,"Caption Close"
Item, "Block element (don't use nth-child)" =Go to page, "javascript:navigator.ujs_adblock.block(true);",,,"Caption Close"
-------------------1
Item, "Unblock element" =Go to page, "javascript:navigator.ujs_adblock.unblock();",,,"Mail Redirected"
Item, "Unblock latest element" =Go to page, "javascript:navigator.ujs_adblock.unblock(true);",,,"Mail Redirected"
-------------------2
Item, "Edit styles" =Go to page, "javascript:navigator.ujs_adblock.edit();",,,"Mail Draft"

CHROMAX Thursday, September 17, 2009 6:42:09 PM

cool,

for the "wishlist".

Sometimes it is nearly impossible to get a div with an linked content, because if you click into the div it starts the content (sometimes flash). So you have to get the 1px wide css border.

Possible solution:
When you hover an object, there is a small button beneath the hovered object with an X button.
OR
to make the border bigger. Maybe 5px or so. But I didn´t tested that.

Write a comment

New comments have been disabled for this post.