[Done] Show "Block" button only when the object is

Various discussions related to Adblock Plus development

[Done] Show "Block" button only when the object is

Postby Wladimir Palant » Wed Apr 22, 2009 9:53 am

I said quite a few times before that it is impossible to detect when Flash (or a different object) is hovered. Which is why the "Block" button is permanently visible. Luckily, I was now proven wrong: http://userstyles.org/styles/17142

Ideally, Adblock Plus would not insert anything into the document at all. Only when the object is hovered the "Block" button should be created and displayed. This would solve several problems:

1. Users are annoyed by seemingly pointless "Block" buttons. On the other hand, they often don't realize that this button is how you block Flash - if the button appears after the mouse is moved to the Flash object the connection will be more obvious.

2. Insertion of the object tab sometimes messes up the objects (common for Flash on Mac).

3. Object tab position gets wrong if object's dimensions/position change over time - if we only display the object tab when necessary we can recalculate the position every time.

Will have to try a few things to see whether the ideal solution is doable - or whether we still need to insert the object tab immediately but hide/unhide it as necessary.
Last edited by Wladimir Palant on Tue Jul 14, 2009 4:21 pm, edited 2 times in total.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

how about a key sequence?

Postby peekaboo » Thu Jun 04, 2009 1:33 pm

Why not hook the CTRL key? CTRL key down, block buttons show.

At the least, can there be a key sequence to toggle adblocking? CTRL A and its enabled would save a lot of mouse fishing.
Sweet.
peekaboo
 

Re: how about a key sequence?

Postby reepicheep » Thu Jun 04, 2009 2:56 pm

peekaboo wrote:Why not hook the CTRL key? CTRL key down, block buttons show.

At the least, can there be a key sequence to toggle adblocking? CTRL A and its enabled would save a lot of mouse fishing.


Except on non-Windows platforms CTRL has other meanings and to toggle buttons like that would be very distracting. Plus purloining specifc and standard CTRL-key sequences is not a good idea; CTRL-A is almost universally a shortcut for "Select All".
reepicheep
 
Posts: 126
Joined: Wed Dec 24, 2008 2:15 pm

Re: how about a key sequence?

Postby Wladimir Palant » Thu Jun 04, 2009 3:10 pm

peekaboo wrote:At the least, can there be a key sequence to toggle adblocking? CTRL A and its enabled would save a lot of mouse fishing.
Sweet.

http://adblockplus.org/en/faq_customization#shortcuts

As to the other suggestion - how is anybody supposed to know that he has to press Ctrl to block Flash?
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Wladimir Palant » Wed Jun 24, 2009 12:40 am

Made some progress on this: http://hg.mozdev.org/adblockplus/rev/35d11a947cc2

This already makes sure that the "Block" button only appears when the object is hovered. Position of the button is calculated when it shows up. Outstanding issues:

* Mouse over object isn't always recognized, especially when the mouse pointer moves fast or user switches windows. Also, moving from one object to another isn't recognized. This is a Firefox issue, not much I can do about it.
* When the button is repositioned it briefly appears at its original position before being moved - doesn't look nice.
* Still inserting an element into the document, this might cause issues (but the code is less problematic now).
* Bug 12910 is still alive but it might be possible to fix it now.
* Apparently, ":hover" only works for objects if you specify the tag name as well, no idea why that is. Let's hope that objects will stay limited to <object>, <embed> and <applet> tags.

Development build coming.

Edit: Development build is available - http://adblockplus.org/development-builds/showing-tabs-on-flash-only-when-hovered. Please test and tell me what you think.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby fanboy » Wed Jun 24, 2009 1:38 am

How about making object tabs disabled by default?
User avatar
fanboy
 
Posts: 3446
Joined: Sun Jun 17, 2007 4:45 am

Postby Wladimir Palant » Wed Jun 24, 2009 1:44 am

fanboy wrote:How about making object tabs disabled by default?

Why? Nobody will ever find them then and we will be swamped in questions along the lines of "Adblock Plus cannot block this ad, why?" We have lots of these questions already.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Wladimir Palant » Wed Jun 24, 2009 2:35 am

Wladimir Palant wrote:* Apparently, ":hover" only works for objects if you specify the tag name as well, no idea why that is. Let's hope that objects will stay limited to <object>, <embed> and <applet> tags.

Bug 500075 lifted the mystery, this behavior is for quirks mode only (apparently some website cannot deal with ":hover" being supported on all elements). Fixed this issue (http://hg.mozdev.org/adblockplus/rev/32fac8c08096), now object tabs aren't limited to specific tags.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby fanboy » Wed Jun 24, 2009 8:47 am

Wasnt object tabs causing incorrect readings on acid3?
User avatar
fanboy
 
Posts: 3446
Joined: Sun Jun 17, 2007 4:45 am

Postby pete » Wed Jun 24, 2009 10:11 pm

When you move you mouse over a flash object and then use your scroll mouse, the label stays fixed. It doesn't follow the scrolling page.
Example: http://www.youtube.com/watch?v=M9BON5nd8Fg
Move you mouse over the film and scroll (stay with your mouse within the object).

When you reenter the object, the label gets redrawn on the correct position.


Also it would be nice, if the label would be more unobtrusive. Nearly every time I hover over a object, i get distracted by the label. A slow fade effect and/or delay would be cool, but I don't know if this is possible.
pete
 

Postby Wladimir Palant » Thu Jun 25, 2009 8:03 am

fanboy wrote:Wasnt object tabs causing incorrect readings on acid3?

This was a while ago. No, it doesn't do that any more.

pete wrote:When you move you mouse over a flash object and then use your scroll mouse, the label stays fixed.

Yes, I fixed this already, new development build will be out soon.

Wladimir Palant wrote:* When the button is repositioned it briefly appears at its original position before being moved - doesn't look nice.

This is mostly taken care of in http://hg.mozdev.org/adblockplus/rev/eae534acf07a

Wladimir Palant wrote:* Still inserting an element into the document, this might cause issues (but the code is less problematic now).
* Bug 12910 is still alive but it might be possible to fix it now.

I tried a few things but without success, looks like these two won't be fixed. Still, current solution is significantly better than what we had before.

Edit: New development build: http://adblockplus.org/development-buil ... s-on-flash
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby pete » Thu Jun 25, 2009 10:12 am

With the new build, the tab position is incorrect. It seems to have an offset of circa 300px.

Image

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1) Gecko/20090616 Firefox/3.5
Adblock Plus 1.1alpha.0+.2009062508
pete
 

Postby Wladimir Palant » Thu Jun 25, 2009 10:22 am

pete, thanks. I tested on YouTube before but not for this build. Will check what went wrong there.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Wladimir Palant » Thu Jun 25, 2009 10:53 am

Fixed position calculation: http://hg.mozdev.org/adblockplus/rev/4e462b509b84
Re-uploaded the development build, this issue should be gone in the current version.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany


Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 3 guests