[Done] Show "Block" button only when the object is
[Done] Show "Block" button only when the object is
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.
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.
how about a key sequence?
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.
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.
-
- Posts: 126
- Joined: Wed Dec 24, 2008 1:15 pm
Re: how about a key sequence?
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".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.
Re: how about a key sequence?
http://adblockplus.org/en/faq_customization#shortcutspeekaboo 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.
As to the other suggestion - how is anybody supposed to know that he has to press Ctrl to block Flash?
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-buil ... en-hovered. Please test and tell me what you think.
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-buil ... en-hovered. Please test and tell me what you think.
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 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.
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.
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.
This was a while ago. No, it doesn't do that any more.fanboy wrote:Wasnt object tabs causing incorrect readings on acid3?
Yes, I fixed this already, new development build will be out soon.pete wrote:When you move you mouse over a flash object and then use your scroll mouse, the label stays fixed.
This is mostly taken care of in http://hg.mozdev.org/adblockplus/rev/eae534acf07aWladimir Palant wrote:* When the button is repositioned it briefly appears at its original position before being moved - doesn't look nice.
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.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.
Edit: New development build: http://adblockplus.org/development-buil ... s-on-flash
Fixed position calculation: http://hg.mozdev.org/adblockplus/rev/4e462b509b84
Re-uploaded the development build, this issue should be gone in the current version.
Re-uploaded the development build, this issue should be gone in the current version.