mirror of
https://git.fuwafuwa.moe/you/stop_cloudflare
synced 2024-12-27 07:23:20 +01:00
Delete 'addons/urejectCR/bg.js'
This commit is contained in:
parent
fff525a8c0
commit
2a0c09cafa
@ -1,34 +0,0 @@
|
||||
let history = {};
|
||||
chrome.webRequest.onResponseStarted.addListener(i => {
|
||||
if ([403, 406, 410, 429, 451, 462].includes(i.statusCode)) {
|
||||
let iFQDN = (new URL(i.url)).hostname;
|
||||
if (['searxes.eu.org', 'ansero.eu.org', 'ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion', 'searxes.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion', 'ansero.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion'].includes(iFQDN)) {
|
||||
return;
|
||||
}
|
||||
let iServer = '?';
|
||||
i.responseHeaders.forEach(x => {
|
||||
if (x.name == 'Server' || x.name == 'server') {
|
||||
iServer = x.value;
|
||||
}
|
||||
});
|
||||
history[iFQDN] = [i.url, iServer, i.statusCode, (new Date()).toUTCString()];
|
||||
}
|
||||
return;
|
||||
}, {
|
||||
urls: ['http://*/*', 'https://*/*'],
|
||||
types: ['main_frame']
|
||||
}, ['responseHeaders']);
|
||||
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
if (request && sender) {
|
||||
if (request == 'get') {
|
||||
sendResponse(history);
|
||||
}
|
||||
if (request == 'clear') {
|
||||
history = {};
|
||||
sendResponse(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
chrome.browserAction.onClicked.addListener(() => {
|
||||
chrome.runtime.openOptionsPage();
|
||||
});
|
Loading…
Reference in New Issue
Block a user