From 1872fbcb3c502822761d951f21949572878c3b1e Mon Sep 17 00:00:00 2001 From: Ray Lothian Date: Wed, 13 Mar 2019 10:24:03 +0100 Subject: [PATCH] fixes #29 --- extension/common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/common.js b/extension/common.js index 3201072..dc62565 100644 --- a/extension/common.js +++ b/extension/common.js @@ -183,7 +183,7 @@ function match({url, tabId}) { if (prefs.mode === 'blacklist') { if (prefs.blacklist.length) { const h = hostname(url); - return prefs.blacklist.some(s => () => { + return prefs.blacklist.some(s => { if (s === h) { return true; } @@ -254,11 +254,13 @@ var onBeforeSendHeaders = ({tabId, url, requestHeaders, type}) => { }; var onCommitted = ({frameId, url, tabId}) => { + console.log(url, cache[tabId] === true); if (url && (url.startsWith('http') || url.startsWith('ftp')) || url === 'about:blank') { if (cache[tabId] === true) { return; } const o = cache[tabId] || ua.object(tabId); + console.log(o, url); if (o.userAgent) { let {userAgent, appVersion, platform, vendor} = o; if (o.userAgent === 'empty') {