mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
30 lines
578 B
JavaScript
30 lines
578 B
JavaScript
|
'use strict';
|
||
|
|
||
|
function blockInform(details) {
|
||
|
if (details.tabId !== -1 && details.ip === antizapret.proxyIp) {
|
||
|
|
||
|
chrome.pageAction.setIcon({
|
||
|
path: '/assets/icons/rkn-disabled.png',
|
||
|
tabId: details.tabId
|
||
|
});
|
||
|
|
||
|
chrome.pageAction.setTitle({
|
||
|
title: 'Сайт блокирован!',
|
||
|
tabId: details.tabId
|
||
|
});
|
||
|
|
||
|
chrome.pageAction.show(details.tabId);
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
chrome.webRequest.onCompleted.addListener(
|
||
|
blockInform,
|
||
|
{ urls: ['<all_urls>'] }
|
||
|
);
|
||
|
|
||
|
chrome.webRequest.onErrorOccurred.addListener(
|
||
|
blockInform,
|
||
|
{ urls: ['<all_urls>'] }
|
||
|
);
|