From ec0bf61d1ae961aeee02b97b4d9ddb3eb93f0c78 Mon Sep 17 00:00:00 2001 From: username Date: Tue, 7 May 2019 10:07:55 +0000 Subject: [PATCH] Delete 'not_cloudflare/whyrejectme/bg.js' --- not_cloudflare/whyrejectme/bg.js | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 not_cloudflare/whyrejectme/bg.js diff --git a/not_cloudflare/whyrejectme/bg.js b/not_cloudflare/whyrejectme/bg.js deleted file mode 100644 index a60583fa1..000000000 --- a/not_cloudflare/whyrejectme/bg.js +++ /dev/null @@ -1,31 +0,0 @@ -let history = {}; - -browser.webRequest.onResponseStarted.addListener(i => { - if (i.statusCode == 403) { - let iFQDN = (new URL(i.url)).hostname; - let iServer = 'Unknown'; - i.responseHeaders.forEach(x => { - if (x.name == 'Server') { - iServer = x.value; - } - }); - let iDate = (new Date()).toUTCString(); - history[iFQDN] = [i.url, iServer, iDate]; - } - return; -}, { - urls: ['http://*/*', 'https://*/*'], - types: ['main_frame'] -}, ['responseHeaders']); - -browser.runtime.onMessage.addListener((request, sender, sendResponse) => { - if (request && sender) { - if (request == 'get') { - sendResponse(history); - } - if (request == 'clear') { - history = {}; - sendResponse(true); - } - } -}); \ No newline at end of file