From 18e6f30c1c6ddcd16caaf570322545a1bf3cf3d9 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 12 Dec 2020 14:38:44 -0500 Subject: [PATCH] Minor code review Related commit: - https://github.com/gorhill/uBlock/commit/6df32675b16b591313b40231583b4d06dda9e526 --- src/js/traffic.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index e0734b661..8c42ee96a 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -358,7 +358,7 @@ const onBeforeBehindTheSceneRequest = function(fctxt) { // way to know for sure which exact page triggered a tabless network // request. -onBeforeBehindTheSceneRequest.journalAddRequest = (( ) => { +{ let hostname = ''; let pageStores = new Set(); let pageStoresToken = 0; @@ -376,7 +376,7 @@ onBeforeBehindTheSceneRequest.journalAddRequest = (( ) => { gcTimer = vAPI.setTimeout(gc, 30011); }; - return function(fctxt, result) { + onBeforeBehindTheSceneRequest.journalAddRequest = (fctxt, result) => { const { docHostname } = fctxt; if ( docHostname !== hostname || @@ -398,7 +398,7 @@ onBeforeBehindTheSceneRequest.journalAddRequest = (( ) => { pageStore.journalAddRequest(fctxt.hostname, result); } }; -})(); +} /******************************************************************************/