Created
March 3, 2016 15:34
-
-
Save bwinton/2cc196eac20a3161317b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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