MozillaZine

keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
avada
 
Posts: 1831
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Post Posted June 27th, 2019, 6:37 am

morat wrote:@avada

Try something like:

Code: Select all
var css = [];
css.push("#TabsToolbar { visibility: collapse !important; }");
// css.push("...");
// css.push("...");
var ios = Components.classes["@mozilla.org/network/io-service;1"].
  getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("data:text/css," + encodeURIComponent(css.join("\n")), null, null);
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].
  getService(Components.interfaces.nsIStyleSheetService);
if (sss.sheetRegistered(uri, sss.USER_SHEET)) {
  sss.unregisterSheet(uri, sss.USER_SHEET);
} else {
  sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
}


Thanks. I'll try it.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests