| Index: lib/main.js |
| =================================================================== |
| --- a/lib/main.js |
| +++ b/lib/main.js |
| @@ -15,13 +15,10 @@ |
| Prefs.migrate("extensions.adblockplus.ehh.showhelp", "showhelp"); |
| // Window types to attach to |
| -let knownWindowTypes = |
| -{ |
| - "navigator:browser": true, |
| - "mail:3pane": true, |
| - "mail:messageWindow": true, |
| - __proto__: null |
| -}; |
| +let knownWindowTypes = Object.create(null); |
|
Wladimir Palant
2015/04/01 19:01:14
Better: Set(["navigator:browser", "mail:3pane", "m
Sebastian Noack
2015/04/02 07:19:47
True.
|
| +knownWindowTypes["navigator:browser"] = true; |
| +knownWindowTypes["mail:3pane"] = true; |
| +knownWindowTypes["mail:messageWindow"] = true; |
| // Use random marker class |
| let elementMarkerClass = null; |
| @@ -48,7 +45,7 @@ |
| let styleService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); |
| let styleURI = Services.io.newURI("data:text/css," + encodeURIComponent(data), null, null); |
| styleService.loadAndRegisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET); |
| - onShutdown.add(function() styleService.unregisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET)); |
| + onShutdown.add(() => styleService.unregisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET)); |
| }, false); |
| request.send(null); |