Upload files to 'addons/urejectCR'

This commit is contained in:
letssync 2020-07-31 01:17:26 +02:00
parent ec7b5191e5
commit f892548d62
4 changed files with 103 additions and 0 deletions

34
addons/urejectCR/bg.js Normal file
View File

@ -0,0 +1,34 @@
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();
});

20
addons/urejectCR/log.html Normal file
View File

@ -0,0 +1,20 @@
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>&#128221;</title>
</head>
<body style="display:none">
<br><br>
<b>Detaloj</b><br>
<table style="width:90%" border=1>
<tbody></tbody>
</table>
<br>
<input id="clear" type="button" value=" Malplenigu liston "><br>
<br><br>
<b>Nur FQDN</b><br>
<textarea id="export" cols=60 rows=20 readonly></textarea>
<script src="log.js"></script>
</body>
</html>

18
addons/urejectCR/log.js Normal file
View File

@ -0,0 +1,18 @@
function newrow(w) {
let tt = document.getElementsByTagName('tbody')[0];
let tr = tt.insertRow(tt.rows.length);
tr.innerHTML = w;
}
newrow('<tr><td><b>FQDN</b></td><td><b>Servilo</b></td><td><b>Stato</b></td><td><b>Kie</b></td><td><b>Kiam</b></td></tr>');
chrome.runtime.sendMessage('get', g => {
for (let k in g) {
newrow('<tr><td>' + k + '</td><td>' + g[k][1] + '</td><td>' + g[k][2] + '</td><td><a href="' + g[k][0] + '" rel="noreferrer noopener" target="_blank"> &#128279; </a></td><td>' + g[k][3] + '</td></tr>');
document.getElementById('export').innerHTML += k + "\n";
}
});
document.body.style.display = 'block';
document.getElementById('clear').addEventListener('click', () => {
chrome.runtime.sendMessage('clear', () => {
location.reload(true);
});
});

View File

@ -0,0 +1,31 @@
{
"manifest_version": 2,
"name": "Kiu retejo malakceptis min?",
"version": "1.0.2",
"minimum_chrome_version": "60",
"homepage_url": "https://ss.wodferndripvpe6ib4uz4rtngrnzichnirgn7t5x64gxcyroopbhsuqd.onion/",
"author": "Ss",
"incognito": "split",
"permissions": [
"webRequest",
"<all_urls>"
],
"icons": {
"72": "icons/72.png"
},
"background": {
"scripts": [
"bg.js"
]
},
"options_ui": {
"open_in_tab": true,
"chrome_style": false,
"page": "log.html"
},
"browser_action": {
"default_icon": {
"72": "icons/72.png"
}
}
}