Skip to content

Instantly share code, notes, and snippets.

@bwinton
Created March 3, 2016 15:34
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 bwinton/2cc196eac20a3161317b to your computer and use it in GitHub Desktop.
Save bwinton/2cc196eac20a3161317b to your computer and use it in GitHub Desktop.
global.getStylesheets = () => {
let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"]
.getService(Components.interfaces.nsIStyleSheetService);
let styleSheetURI = Services.io.newURI("chrome://browser/content/extension.css",
null, null);
let styleSheet = styleSheetService.preloadSheet(styleSheetURI,
styleSheetService.AGENT_SHEET);
styleSheetURI = Services.io.newURI("chrome://browser/content/extension-mac.css",
null, null);
let macStyleSheet = styleSheetService.preloadSheet(styleSheetURI,
styleSheetService.AGENT_SHEET);
global.getStylesheets = () => {
return {"base": styleSheet, "mac": macStyleSheet};
};
return global.getStylesheets();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment