Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Last active August 26, 2015 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhelmer/362ed9b55e18cf06a5a6 to your computer and use it in GitHub Desktop.
Save rhelmer/362ed9b55e18cf06a5a6 to your computer and use it in GitHub Desktop.
function startup() {
let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"]
.getService(Components.interfaces.nsIStyleSheetService);
let styleSheetURI = Services.io.newURI("chrome://myaddon/skin/toolbar.css", null, null);
styleSheetService.loadAndRegisterSheet(styleSheetURI, styleSheetService.USER_SHEET);
// returns true
console.log(styleSheetService.sheetRegistered(styleSheetURI, styleSheetService.USER_SHEET));
}
skin myaddon classic/1.0 skin/
@-moz-document url("chrome://browser/content/browser.xul") {
#loop-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #my-button {
list-style-image: url(chrome://myaddon/skin/menuPanel.png);
-moz-image-region: rect(0, 32px, 32px, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment