Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/main.js

Issue 6520005931827200: Issue 2259 - Removed non-standard JavaScript code from Element Hiding Helper (Closed)
Patch Set: Created April 1, 2015, 3:16 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/inspectorObserver.js ('k') | lib/windowWrapper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « lib/inspectorObserver.js ('k') | lib/windowWrapper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld