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

Unified Diff: lib/requestBlocker.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Define and destructure backgroundPage more consistently, fix minor whitespace errors Created Jan. 18, 2017, 7:34 a.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
Index: lib/requestBlocker.js
diff --git a/lib/requestBlocker.js b/lib/requestBlocker.js
index 91df223d5a1b82d6684d5d20f8a8c44ee7c4ed87..a36c8bdcdb5982ddc44a0d53d2bb86ac689ccebc 100644
--- a/lib/requestBlocker.js
+++ b/lib/requestBlocker.js
@@ -19,15 +19,15 @@
"use strict";
-let {Filter, RegExpFilter, BlockingFilter} = require("filterClasses");
-let {Subscription} = require("subscriptionClasses");
-let {defaultMatcher} = require("matcher");
-let {FilterNotifier} = require("filterNotifier");
-let {Prefs} = require("prefs");
-let {checkWhitelisted, getKey} = require("whitelisting");
-let {stringifyURL, extractHostFromFrame, isThirdParty} = require("url");
-let {port} = require("messaging");
-let devtools = require("devtools");
+const {Filter, RegExpFilter, BlockingFilter} = require("filterClasses");
+const {Subscription} = require("subscriptionClasses");
+const {defaultMatcher} = require("matcher");
+const {FilterNotifier} = require("filterNotifier");
+const {Prefs} = require("prefs");
+const {checkWhitelisted, getKey} = require("whitelisting");
+const {stringifyURL, extractHostFromFrame, isThirdParty} = require("url");
+const {port} = require("messaging");
+const devtools = require("devtools");
// Chrome can't distinguish between OBJECT_SUBREQUEST and OBJECT requests.
RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT;
@@ -152,7 +152,7 @@ FilterNotifier.on("filter.removed", onFilterChange);
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true));
FilterNotifier.on("load", onFilterChange);
-port.on("request.websocket", function(msg, sender)
+port.on("request.websocket", (msg, sender) =>
{
return ext.webRequest.onBeforeRequest._dispatch(
new URL(msg.url),

Powered by Google App Engine
This is Rietveld