BS-Harou

Just another blog about the best browser - Opera!

AdBlock

,

I quite liked AdBlock from Lex1 (http://my.opera.com/Lex1/blog/adblock-for-opera-analogue-of-adblock-plus-element-hiding-helper). But in my opinion it's really hard to make any changes here. So I created my own version of this AdBlock with upgraded "Edit Options".

Here is the user script: http://files.myopera.com/BS-Harou/files/AdBlock2.0.js

How it looks like:


In case you want have AdBlock in Right Click Context Menu, go to Preferences>Advanced>Toolbars and duplicate "Menu setup". Than go in windows to [Profile]/Application Data/Opera/[version of opera]/menu and open "standard_menu (1).ini"

Find there [Document Popup Menu] and Add this:
Submenu, "AdBlock", AdBlock Menu

And than you have to create this menu:
[AdBlock Menu]
Item, "Block"="Go to page, "javascript:window.navigator.ujs_adblock.block()",,,"Blank""
Item, "Unblock Last"="Go to page, "javascript:window.navigator.ujs_adblock.unblock(true)",,,"Blank""
Item, "Unblock All"="Go to page, "javascript:window.navigator.ujs_adblock.unblock()",,,"Blank""
Item, "Edit"="Go to page, "javascript:window.navigator.ujs_adblock.edit()",,,"Blank""

Opera MenusOpera 10.5 b3218 bugs

Comments

vipin kumarmvk6 Tuesday, February 9, 2010 4:34:30 PM

nice one!! but after i block an element, the pointer keeps showing blue background (i mean its ready to block if i click), how can i confirm that blocking is over??

Martin KadlecBS-Harou Tuesday, February 9, 2010 4:52:10 PM

Escape key on the keyboard

Martin KadlecBS-Harou Tuesday, February 9, 2010 4:56:06 PM

With original script you can always block only one element and then you had to click on "Block" or use "ALT+SHIFT+B" again to block another. So I decided to do it this way, that you can block how many elements you want and then just press the "Esc" .. but it would be obviously good idea to create another more visible Stop blocking function. Do you have any idea how to do that?

vipin kumarmvk6 Tuesday, February 9, 2010 5:23:05 PM

Thats so cool!! Thanks!! And alas I dunno!!

rolandb313 Tuesday, March 9, 2010 1:41:14 PM

This is awesome, but where is the css file so I can custom edit it?
Thanks!

Martin KadlecBS-Harou Saturday, March 13, 2010 1:25:39 PM

rolandb313: Everything is stored in the localStorage (or cookies in O10.10). But you can edit it with ALT+SHIFT+E

(sorry for late answer - I was away from PC for week)

metude Wednesday, March 17, 2010 8:07:12 AM

The link is broken.

"The requested URL /jaffove/ostatni/opera/AdBlock2.0.js was not found on this server."

Martin KadlecBS-Harou Wednesday, March 17, 2010 12:09:17 PM

metude: thank you, I reuploaded it on my Opera. The link should be working now =)

Mağruf ÇolakoğluZAHEK Friday, March 19, 2010 2:24:53 PM

Thanks. Where does it save blocking content?
And it seems when the page reload , advertises go back...

Martin KadlecBS-Harou Friday, March 19, 2010 3:51:14 PM

z@h3k: localStorage in O10.5, cookies in O10.10

On some sites from unknown reasons it really doesn't save the advertises. Sometimes it may be caused because there is javascript in blocked element.

You can try this one http://my.opera.com/Lex1/blog/adblock-for-opera-analogue-of-adblock-plus-element-hiding-helper and if this one works and mine not, than write me please on which site! =)

Mağruf ÇolakoğluZAHEK Friday, March 19, 2010 9:53:29 PM

Can we change locastorage file path for a spesific web site not t odelete it when we deleted our private information..

rolandb313 Friday, March 19, 2010 10:11:30 PM

I can give 1 site which doesn't work:
http://www.filestube.com/search.html?q=hello&select=All

Actually, that's the main reason I asked, I wanted to do it manually since it wasn't working for some sites. Also, wanted to try identify patterns and do a wildcard block of some sort, but ctrl-shift-e showed 2 different things being blocked as being the same, so wasn't totally reliable.

Also have the problem that new things I block rarely stay blocked forever.

Martin KadlecBS-Harou Saturday, March 20, 2010 9:09:47 AM

Originally posted by ZAHEK:

Can we change locastorage file path for a spesific web site not t odelete it when we deleted our private information..



It's not possible, I recommend you to have unchecked "Delete Web Storage databases" =)


Originally posted by rolandb313:

ctrl-shift-e showed 2 different things being blocked as being the same


Try to delete them in the alt+shift+e dialog, click on add and create your own. Sometimes the best options is to ADD just something simple like: DIV[id="advert"]

Martin KadlecBS-Harou Saturday, March 20, 2010 9:12:55 AM

Originally posted by rolandb313:

I can give 1 site which doesn't work:



For files tube I use this (you can put it in by insert button in alt+shift+e dialog):

A[href="http://www.filestube.com/helpus.html"],IMG[src="http://static.filestube.com/files/images/feedback.gif"],HTML>BODY>DIV[class="content"]:nth-child(3)>DIV[id="results_box"]:nth-child(8)>DIV[class="resultadv2"]:nth-child(3),HTML>BODY>DIV[class="content"]:nth-child(3)>DIV[id="results_box"]:nth-child(8)>DIV[class="results"][id="results"]:nth-child(1)>DIV[class="other_adv2"]:nth-child(2),HTML>BODY>DIV[class="content"]:nth-child(3)>DIV:nth-child(10)


This one is working for me even after refresh =)

rolandb313 Friday, March 26, 2010 8:08:39 AM

Originally posted by BS-Harou:

It's not possible, I recommend you to have unchecked "Delete Web Storage databases" =)

Where do we find this option? Couldn't find it in opera:config nor Advanced Preferences.

Thanks for the filestube one, but it still wouldn't work, even after refresh. It deleted the ad, but when I refreshed, it came back, and alt-shift-e showed nothing, as if I'm not able to save anything for that site.

Mağruf ÇolakoğluZAHEK Friday, March 26, 2010 9:04:41 AM

Originally posted by rolandb313:

Where do we find this option? Couldn't find it in opera:config nor Advanced Preferences.


Go to menu bar Tools/Delete private data

http://j.imagehost.org/0931/2010-03-26_110238.png -

AnuaR ShInDigazzZ Wednesday, July 28, 2010 9:48:29 AM

With original script you can always block only one element and then you had to click on "Block" or use "ALT+SHIFT+B" again to block another.



Excellent!
That I really did not have enough in the version Lex1

But there are downsides - in your version there is no point
Item, "Block" = "Go to page," javascript: window.navigator.ujs_adblock.block (true )",,," Blank ""
and it is not very convenient because those blocks that can be locked with a single click - accounted for one block (I block 5, and tomorrow will be 6-th)

It is understandable that you specifically it was removed so that the user does not accidentally blocked all the content, but nevertheless it is convenient, so that>

Feedback + Suggestions
1. Item, "Block" = "Go to page," javascript: window.navigator.ujs_adblock.block (true )",,," Blank "" when you move immediately to show what other elements fall under the rule;
2. Make a window to moveable (like http://ruzanow.ru/userjs/google-translate.js) and when you click on the rule displayed blocked element http://s13.radikal.ru/i186/1007/de/fab75b9f4ba1.png -
3. The rules do not fit in the window + make nicer and neat this window

Martin KadlecBS-Harou Wednesday, July 28, 2010 11:05:06 AM

Thanks for your feedback. Unfortunately I don't have much time now... But I know there is lots of things that should be done about this userJS, so perhaps I will one day make some updates =)

BTW I don't get what do you mean in point one, can you please reformulated it? Thank you =)

AnuaR ShInDigazzZ Thursday, July 29, 2010 6:46:30 AM

in Lex1's version there're two block actions:
1. ujs_adblock.block (true)
2. ujs_adblock.block ()

#1 blocks elements block elements
#2 blocks elements block elements, use :nth-child

When you blocking element (without using :nth-child), all the items falling under the rule are highlighted.

There's no confirmation dialog in your version and it turns out that I'm singling out one element for blocking, and with it blocked more elements...

So, i want for when you hover on the element (ujs_adblock.block (true)) to provide all the elements that will be blocked

thnx

Martin KadlecBS-Harou Thursday, July 29, 2010 9:48:50 AM

okey dokey =)

AnuaR ShInDigazzZ Thursday, July 29, 2010 11:12:43 AM

A couple more suggestions>

Blocking:
1. Clicking button "Block"
2. Hold down CTRL and marking elements to hide...
3. Pressed ESC and all marked items disappeared ...

Unlocking:
1. Clicking "Unblock"
2. Hold down CTRL marking elements to unblock without the need each time you click "Unblock"
3. Press ESC and went out of mode unlock

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

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

If you can't read the words, press the small reload icon.


Smilies

June 2013
M T W T F S S
May 2013July 2013
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30