Skip to content
Browse files

using the userstyles module

  • Loading branch information...
1 parent 5c20fa0 commit b935c788821ba4d0e9fe3ea79d6db82fe0db3ebf @erikvold erikvold committed
Showing with 3 additions and 8 deletions.
  1. +2 −7 lib/main.js
  2. +1 −1 package.json
View
9 lib/main.js
@@ -415,13 +415,8 @@ exports.main = function(options) {
id: "cheevos-achievementOverlay",
onCommand: function () { loadCheevosPage(); }
});
- let sss = Cc["@mozilla.org/content/style-sheet-service;1"]
- .getService(Ci.nsIStyleSheetService);
- let ios = Cc["@mozilla.org/network/io-service;1"]
- .getService(Ci.nsIIOService);
- let chromeStylesheet = data.url("chrome.css");
- let chromeStylesheetUri = ios.newURI(chromeStylesheet, null, null);
- sss.loadAndRegisterSheet(chromeStylesheetUri, sss.AGENT_SHEET);
+
+ require('userstyles').load(data.url("chrome.css"), {type: 'agent'});
// show cheevo for installing the addon
onObservation(cheevos.addOnsOpened, true, "bronze");
View
2 package.json
@@ -1,6 +1,6 @@
{
"author": "Jared Wein",
- "dependencies": ["addon-kit", "api-utils", "protocol", "toolbarbutton", "vold-utils"],
+ "dependencies": ["addon-kit", "api-utils", "protocol", "toolbarbutton", "vold-utils", "userstyles"],
"description": "Cheevos is an addon for Firefox that makes learning about different parts of the browser fun, as well as giving you the opportunity to brag to your friends about your pro-level web surfing.",
"fullName": "Cheevos",
"icon": "cheevos-toolbar-24x24.png",

0 comments on commit b935c78

Please sign in to comment.
Something went wrong with that request. Please try again.