mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
Unmute errors-to-exc errors, fix one, mend UI
This commit is contained in:
parent
a3c571cb22
commit
766529d8b9
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
{
|
||||
const chromified = window.utils.chromified;
|
||||
|
||||
const lastErrors = [];
|
||||
const lastErrorsLength = 20;
|
||||
|
@ -10,7 +11,7 @@
|
|||
get: () => lastErrors,
|
||||
}
|
||||
|
||||
chrome.webRequest.onErrorOccurred.addListener((details) => {
|
||||
chrome.webRequest.onErrorOccurred.addListener(chromified((err/*Ignored*/, details) => {
|
||||
|
||||
if (!that.ifCollecting || [
|
||||
'net::ERR_BLOCKED_BY_CLIENT',
|
||||
|
@ -25,11 +26,11 @@
|
|||
}
|
||||
|
||||
lastErrors.unshift(details);
|
||||
if (lastErrors.length > lastErrorsLenght) {
|
||||
if (lastErrors.length > lastErrorsLength) {
|
||||
lastErrors.pop();
|
||||
}
|
||||
|
||||
},
|
||||
}),
|
||||
{urls: ['<all_urls>']}
|
||||
);
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<h3>Список последних ошибок</h3>
|
||||
Новые сверху, количество ошибок ограничено 20тью.
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -13,6 +13,10 @@ chrome.runtime.getBackgroundPage( (bgWindow) =>
|
|||
|
||||
const exc = bgWindow.apis.pacKitchen.getPacMods().exceptions || {};
|
||||
tbody.innerHTML = '';
|
||||
if (!errors.length) {
|
||||
tbody.innerHTML = '<tr><td colspan="4">Ошибок пока не было.</td></tr>';
|
||||
return;
|
||||
}
|
||||
errors.forEach((err, index) => {
|
||||
|
||||
const ifProxy = exc[err.hostname];
|
||||
|
|
Loading…
Reference in New Issue
Block a user