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

Unified Diff: lib/csp.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/csp.js
diff --git a/lib/csp.js b/lib/csp.js
index 5309863ab1bb65b9f8a5318d44ef723d0a6d49e9..6f43c352d9681613ef881fe3a187c2a17969a6ec 100644
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -17,11 +17,11 @@
"use strict";
-let {defaultMatcher} = require("matcher");
-let {BlockingFilter, RegExpFilter} = require("filterClasses");
-let {getDecodedHostname} = require("url");
+const {defaultMatcher} = require("matcher");
+const {BlockingFilter, RegExpFilter} = require("filterClasses");
+const {getDecodedHostname} = require("url");
-chrome.webRequest.onHeadersReceived.addListener(function(details)
+chrome.webRequest.onHeadersReceived.addListener(details =>
{
let hostname = getDecodedHostname(new URL(details.url));
let match = defaultMatcher.matchesAny("", RegExpFilter.typeMap.WEBSOCKET,

Powered by Google App Engine
This is Rietveld