I just spent a couple of hours trying to figure out how to open new tabs from a Firefox sidebar. I found lots of different suggestions but none worked. Well finally I found this and it works.
var browser = top.document.getElementById("content");
var tab = browser.addTab("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;);
An even better way of doing it is through:
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
var browserWindow = kWindowMediator.getMostRecentWindow("navigator:browser");
var browser = browserWindow.getBrowser();
var tab = browser.addTab("https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl;);
This will work from anywhere in Firefox. Sidebar, popup and ordinary pages.
got from Larry William's Weblog
XS: IE and Mozilla also provide the _search value to open links in the search sidebar.
it depends. if the intentions are good then why not. but if it's somewhat evil, then it should be trashed. and definitely against human and dinosaur cloning.
Hi guys,Do you have ideas on implementing role-based and/or permission-based system on Struts?Where can I implement the checking of the roles/permission?we have a servlet extending ActionServlet, can i use that servlet to implement this?