Problem with FF24 and getBrowser().addTab
shaba2 —Sat, 10/19/2013 - 10:09
Good addon
Works very well on FF24
I have only a problem
I have several selfmade button like this:
getBrowser().addTab ("http://www.google.com/");
And when i use it FastDial it don't close himself
On my old FF18 it works perfectly
How can i solve?
Thanks
Open Firefox menu Web Developer > Browser Console - a console window opens. Then try to close the page and see if any errors appear in console.
Whit WEB developer and Error console i have no error...
It seems to me that Fast Dial don't see getBrowser().addTab event
For me is enough something like this
if CURRENT TAB is FAST DIAL then
getBrowser().loadURI ("http://www.google.it");
else
getBrowser(). addTab ("http://www.google.it");
Can you help me?
Thanks
Search logos
Search site
Navigation
User login
Online users
Recent comments
-
by: sijiv317594 hours 39 min ago
-
by: sijiv317595 hours 49 min ago
-
by: wakawaka6 hours 22 min ago
-
by: wakawaka6 hours 52 min ago
-
by: wakawaka7 hours 1 min ago
-
by: peter65410 hours 55 min ago
-
by: sijiv3175910 hours 59 min ago
-
by: wakawaka14 hours 28 min ago
Re: Problem with FF24 and getBrowser().addTab
Submitted by telega on Sat, 10/19/2013 - 12:41Well, in fact Fast Dial intercepts gBrowser.addTab() function and if addTab() is called with "about:newtab" or "about: blank" parameter, then replaces this parameter with "chrome://fastdial/content/fastdial.html" value in order for Fast Dial page to be opened in new tabs. However Fast Dial tries to do this very correctly and I'm not sure why problem occurs.
To identify if current tab is Fast Dial, you can try the following code:
var doc = getBrowser().contentDocument;
if (doc.location == "chrome://fastdial/content/fastdial.html") { ... }
See https://developer.mozilla.org/en-US/docs/Code_snippets/Tabbed_browser
Re: Problem with FF24 and getBrowser().addTab
Submitted by shaba2 on Sat, 10/19/2013 - 14:43Yess
Works!
var doc = getBrowser().contentDocument;
if (doc.location == "chrome://fastdial/content/fastdial.html") {
getBrowser().loadURI (" ");
} else {
getBrowser().addTab (" ");
}
Very very well!
Thanks!!!