[Ext] Unified Back-/Forward Button 0.6 [Aug 25]

Announce and Discuss the Latest Theme and Extension Releases.
Locked
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

aoeu wrote:And I'm definitely not double clicking.

Does this happen on a profile with only this extension installed as well? And what platform are you on (open Help -> About and copy the two lines starting with <code>Mozilla/5.0</code>)? As it stands, I'm not able to reproduce the behavior you mention.
aoeu
Posts: 11
Joined: February 19th, 2006, 3:37 pm

Post by aoeu »

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4
Gentoo, therefor the compile date ;)

Same behavior on a clean profile.
siGnatURe [in scii-art]
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

Can you reproduce the issue with a stock build? If not, please contact Gentoo's Firefox package maintainer - otherwise please file a bug about right-click events not being preventDefault'able under Linux.
aoeu
Posts: 11
Joined: February 19th, 2006, 3:37 pm

Post by aoeu »

zeniko wrote:Can you reproduce the issue with a stock build? If not, please contact Gentoo's Firefox package maintainer - otherwise please file a bug about right-click events not being preventDefault'able under Linux.

I'll try to poke around a bit, because I can see both the Session Manager and All-in-One Search Button (or something similar) working fine with right clicking. Grepping for 'prevent' didn't bring up anything in their chrome data, so perhaps this preventDefault is being phased out :P
siGnatURe [in scii-art]
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

So, the <a href="http://mozilla.zeniko.ch/unibafo.xpi">latest version</a> (0.6) will require pretty much all customization through userChrome.css (and userChrome.js) to be modified, as now Firefox's own Back and Forward buttons are unified instead of an additional double-button being available.

You'll e.g. have to replace <code>#unibafo</code> with <code>#back-button[unified]</code> (see the adapted styles in the first post). And in case you're not able to adapt some of your related snippets, feel free to ask again (though just to reiterate: I won't be of much help making modifications for different themes).
Old Dawudd
Posts: 0
Joined: December 31st, 1969, 5:00 pm

max_length

Post by Old Dawudd »

zeniko wrote:So, the <a href="http://mozilla.zeniko.ch/unibafo.xpi">latest version</a> (0.6) will require pretty much all customization through userChrome.css (and userChrome.js) to be modified, as now Firefox's own Back and Forward buttons are unified instead of an additional double-button being available.

It seems <code>extensions.unibafo.max_length</code> is no longer respected. Is that intentional? Thanks.
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

It is. The pref is now called <code>browser.sessionhistory.unified_length</code> and has to be manually created (as an Integer value). It's really mostly for testing, though. What value do you prefer it to be, then?
Old Dawudd
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Dawudd »

Thank you. I can hardly say what the ideal value is. I had been keeping it at 20.
quidmeister
Posts: 2
Joined: December 3rd, 2005, 3:14 pm

Snippet help request

Post by quidmeister »

First off, thank you zeniko for all your contributions. unibafo.xpi, userChrome.js.xpi, and whatever else you've done. I've been lurking here for about a month and I've read many of your helpful posts.

I have this snippet which adds a “clear menu” item to the unified history menu:

Code: Select all

UniBaFo.__addClearListItem = function(aPopup)
 { aPopup.appendChild(document.createElement("menuseparator"));
   var item = aPopup.appendChild(document.createElement("menuitem"));
   item.label = "Clear List";
   item.addEventListener("command", function()
    { gBrowser.selectedBrowser.observe(null, "browser:purge-session-history", "");
      UpdateBackForwardButtons(); },
   false); };

eval("UniBaFo.onPopupShowing = " +
 UniBaFo.onPopupShowing.toString().replace(/}(?![^}]*})/, 'this.__addClearListItem(aPopup); $&'));
It works with unibafo version .5 only, of course. I've been trying to make it work with version .6.
I'll keep struggling with it unless I hear from you. It probably does me some good to struggle with it ;)
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

quidmeister: You're welcome.

As for the snippet, it's mostly a question of renaming the functions to cater for the fact that there's no more global <code>UniBaFo</code> object due to the tighter integration into Firefox' own code:

Code: Select all

function UniBaFo_addClearListItem(aPopup) {
   aPopup.appendChild(document.createElement("menuseparator"));
   var item = aPopup.appendChild(document.createElement("menuitem"));
   item.label = "Clear List";
   item.setAttribute("oncommand", 'gBrowser.selectedBrowser.observe(null, "browser:purge-session-history", ""); UpdateBackForwardButtons();');
}
eval("BrowserBackMenu = " + BrowserBackMenu.toString().replace(/;(?=[^;]+;[^;]+$)/, "$& UniBaFo_addClearListItem(popup);"));
quidmeister
Posts: 2
Joined: December 3rd, 2005, 3:14 pm

Post by quidmeister »

Works perfectly! The eval function would've taken me a long time to figure out. The new tighter integration is certainly worthwhile. That should quell folks from griping about their themes, heh heh. Thanks again!
bomfog
Posts: 455
Joined: November 7th, 2002, 3:22 pm
Location: the palouse, SE. WA, USA

Post by bomfog »

I'm addicted to the context menu tab history from this post, but the new version seems to have broken it.

I *think* I fixed userChrome.css, but the tab history list is an empty (very small) box, so I assume some userChrome.js changes are needed.

Updated snippets would be greatly appreciated, if anyone has them handy.

--
Mike
old zeniko
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old zeniko »

bomfog: The only change needed is replacing <code>UniBaFo.onPopupShowing(this);</code> with <code>BrowserBackMenu(event);</code> . As for the CSS, just copy over the extension's CSS (see chrome://unibafo/content/unibafo.css under "special menu items") and replace <code>#back-button</code> with <code>#context-unibafo</code>.
bomfog
Posts: 455
Joined: November 7th, 2002, 3:22 pm
Location: the palouse, SE. WA, USA

Post by bomfog »

Many thanks!

--
Mike
User avatar
XerBlade
Posts: 865
Joined: October 4th, 2005, 10:45 pm
Location: Nashville, TN, US

Post by XerBlade »

There is a problem with the navigation buttons with IE Tab 1.3.3.20070625 and Unified Back-/Forward Button 0.6. It did not exist with UBFB 0.5, but is caused by the changes to the button structure.
The problem is that, with IE Tabs, the Back and Forward buttons do not properly change between disabled and enabled states.
Possible steps to reproduce:
1) Open a site, then switch to IE Tab. [this will leave the Back button enabled and Forward disabled, naturally]
2) Click a site link.
3) Hit Back, and it works normally.
However, Forward remains disabled, so you can't return in that direction without using either the History or context menus.
Other steps:
1) Click a link in IE Tab which is set to open a new window/select to open a link in new IE Tab/open a Bookmark in a new tab which is set up to be an IE Tab already (however you work it so you get a new IE Tab with both buttons disables)
2) Click any links to navigate around.
Both Back and Forward remain disabled and BF history navigation is only possible by the menus.

I'm posting this in the topics for both extensions, mainly so users with this problem who check either topic because of it will see it's been brought up already (though I assume most users would check the IE Tab topic first due to the bug's nature).
Locked