diff --git a/extensions/chromium/minimalistic-pac-setter/extension/1-sync-pac-script-with-pac-provider.js b/extensions/chromium/minimalistic-pac-setter/extension/1-sync-pac-script-with-pac-provider.js
index 2157e93..f77e425 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/1-sync-pac-script-with-pac-provider.js
+++ b/extensions/chromium/minimalistic-pac-setter/extension/1-sync-pac-script-with-pac-provider.js
@@ -221,6 +221,13 @@ chrome.storage.local.get(null, (oldStorage) => {
);
console.log('Alarm listener installed. We won\'t miss any PAC update.');
+ window.addEventListener('online', () => {
+
+ console.log('We are online, checking periodic updates...');
+ antiCensorRu.setAlarms();
+
+ });
+
if (antiCensorRu.ifFirstInstall) {
// INSTALL
console.log('Installing...');
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/3-context-menus.js b/extensions/chromium/minimalistic-pac-setter/extension/3-context-menus.js
index 8de0e16..66602a0 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/3-context-menus.js
+++ b/extensions/chromium/minimalistic-pac-setter/extension/3-context-menus.js
@@ -10,18 +10,19 @@
const removeProtocol = (url) => {
- const link = createLink(url);
+ const link = new URL(url);
return link.href.replace( link.protocol + '//', '' );
+
};
- createMenuLinkEntry( 'Сайт доступен из-за границы? Is up?', (tab) => 'http://isup.me/'+ createLink(tab.url).hostname );
+ createMenuLinkEntry( 'Сайт доступен из-за границы? Is up?', (tab) => 'http://isup.me/'+ new URL(tab.url).hostname );
window.reestrUrl = 'http://reestr.rublacklist.net/search/?q=';
createMenuLinkEntry( 'Сайт в реестре блокировок?', (tab) => {
const ifHost = confirm('Да — искать по домену\nНет — искать по IP (зависит от местоположения)');
- const hostname = createLink( tab.url ).hostname;
+ const hostname = new URL( tab.url ).hostname;
if (ifHost) {
return reestrUrl + hostname;
}
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/pages/other-unblocks/index.js b/extensions/chromium/minimalistic-pac-setter/extension/pages/other-unblocks/index.js
index 403071d..22a5f3c 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/pages/other-unblocks/index.js
+++ b/extensions/chromium/minimalistic-pac-setter/extension/pages/other-unblocks/index.js
@@ -27,7 +27,7 @@ document.body.innerHTML = `
site2pic [COPY]
brow shot [COPY]