Open Stylish 0.5 Help in a new tab instead of a new window

edited March 2007 in Stylish
Here's a userChrome.js script to make the Stylish Manager "Help" button open in a new tab instead of a new window.
Requires WindowHook.

WindowHook.register("chrome://stylish/content/manage.xul", function(aWindow) { var uc_textLinks = aWindow.document.getElementsByTagName("label"); for (var uc_i = 0; uc_i < uc_textLinks.length; uc_i++) { // if (uc_textLinks[uc_i].href.indexOf("")!=-1) { uc_textLinks[uc_i].open = function(event) { var myLink = ""; var wm = Components.classes[";1"] .getService(Components.interfaces.nsIWindowMediator); var browserWindow = wm.getMostRecentWindow("navigator:browser"); if (window._content.location.href == "about:blank"){ window._content.location.href = myLink; } else { var thisWindow = browserWindow.getBrowser(); var newTab = thisWindow.addTab(myLink, null, null); thisWindow.selectedTab = newTab; } } } });


  • Is there any way to make all the stylish actions open in a new tab instead of a new window, or do you have to write a script like this for each of them?
Sign In or Register to comment.