']}
);
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/_locales/en/messages.json b/extensions/chromium/minimalistic-pac-setter/extension/_locales/en/messages.json
new file mode 100644
index 0000000..c9d800a
--- /dev/null
+++ b/extensions/chromium/minimalistic-pac-setter/extension/_locales/en/messages.json
@@ -0,0 +1,17 @@
+{
+ "extName": {
+ "message": "Runet Censorship Bypass"
+ },
+ "extDesc": {
+ "message": "Circumvent Russian internet censorship:"
+ },
+ "proxy": {
+ "message": "proxy"
+ },
+ "noControl": {
+ "message": "Other extension controls proxy!"
+ },
+ "which": {
+ "message": "Which?"
+ }
+}
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/_locales/ru/messages.json b/extensions/chromium/minimalistic-pac-setter/extension/_locales/ru/messages.json
new file mode 100644
index 0000000..53784a1
--- /dev/null
+++ b/extensions/chromium/minimalistic-pac-setter/extension/_locales/ru/messages.json
@@ -0,0 +1,17 @@
+{
+ "extName": {
+ "message": "Обход блокировок Рунета"
+ },
+ "extDesc": {
+ "message": "Обход интернет-цензуры в России:"
+ },
+ "proxy": {
+ "message": "прокси"
+ },
+ "noControl": {
+ "message": "Другое расширение контролирует настройки прокси!"
+ },
+ "which": {
+ "message": "Какое?"
+ }
+}
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/icons/default-grayscale-128.png b/extensions/chromium/minimalistic-pac-setter/extension/icons/default-grayscale-128.png
new file mode 100644
index 0000000..277056b
Binary files /dev/null and b/extensions/chromium/minimalistic-pac-setter/extension/icons/default-grayscale-128.png differ
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/icons/default-mask-128.png b/extensions/chromium/minimalistic-pac-setter/extension/icons/default-mask-128.png
new file mode 100644
index 0000000..2c6db3a
Binary files /dev/null and b/extensions/chromium/minimalistic-pac-setter/extension/icons/default-mask-128.png differ
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/manifest.json b/extensions/chromium/minimalistic-pac-setter/extension/manifest.json
index 208d5b5..44f4b7c 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/manifest.json
+++ b/extensions/chromium/minimalistic-pac-setter/extension/manifest.json
@@ -1,9 +1,10 @@
{
"manifest_version": 2,
- "name": "Обход блокировок Рунета 0.15",
- "description": "Аргументы против цензуры: https://git.io/vEkI9",
- "version": "0.0.0.15",
+ "name": "__MSG_extName__",
+ "default_locale": "en",
+ "description": "__MSG_extDesc__ https://rebrand.ly/ac-wiki",
+ "version": "0.0.0.16",
"icons": {
"128": "/icons/default-128.png"
},
@@ -22,7 +23,13 @@
],
"background": {
- "scripts": ["00-init-apis.js", "11-api-error-handlers.js", "12-api-sync-pac-script-with-pac-provider.js", "30-block-informer.js", "40-context-menus.js"]
+ "scripts": [
+ "00-init-apis.js",
+ "11-api-error-handlers.js",
+ "12-api-sync-pac-script-with-pac-provider.js",
+ "30-block-informer.js",
+ "40-context-menus.js"
+ ]
},
"browser_action": {
"default_title": "Этот сайт благословлён",
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.html b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.html
index 5251c58..11acaa4 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.html
+++ b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.html
@@ -1,8 +1,12 @@
-
+
Выбор провайдера PAC
+
+
+
+
Обновлялись: ...
- Загрузка...
+ Загрузка...
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.js b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.js
index 82f42f4..f197da4 100755
--- a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.js
+++ b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/index.js
@@ -7,17 +7,12 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
const setStatusTo = (msg) => {
- const status = getStatus();
- if (msg) {
- status.classList.remove('off');
- status.innerHTML = msg;
- } else {
- status.classList.add('off');
- }
+ getStatus().innerHTML = msg;
};
const antiCensorRu = backgroundPage.apis.antiCensorRu;
+ const errorHandlers = backgroundPage.apis.errorHandlers;
// SET DATE
@@ -26,15 +21,14 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
let dateForUser = 'никогда';
if( antiCensorRu.lastPacUpdateStamp ) {
let diff = Date.now() - antiCensorRu.lastPacUpdateStamp;
- let units = ' мс';
+ let units = 'мс';
const gauges = [
- [1000, ' с'],
- [60, ' мин'],
- [60, ' ч'],
- [24, ' дн'],
+ [1000, 'с'],
+ [60, 'мин'],
+ [60, 'ч'],
+ [24, 'дн'],
[7, ' недель'],
[4, ' месяцев'],
- [12, ' г'],
];
for(const g of gauges) {
const diffy = Math.floor(diff / g[0]);
@@ -47,7 +41,7 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
}
const dateElement = document.querySelector('.update-date');
- dateElement.innerText = dateForUser;
+ dateElement.innerText = dateForUser + ' / T=' + (antiCensorRu.pacUpdatePeriodInMinutes/60) + 'ч';
dateElement.title = new Date(antiCensorRu.lastPacUpdateStamp)
.toLocaleString('ru-RU');
@@ -95,7 +89,7 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
);
getStatus().querySelector('.link-button').onclick = function() {
- backgroundPage.apis.errorHandlers.viewError(err);
+ errorHandlers.viewError(err);
return false;
};
@@ -180,7 +174,7 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
}
const conpanel = document.getElementById('list-of-handlers');
- backgroundPage.apis.errorHandlers.getEventsMap().forEach( (value, name) => {
+ errorHandlers.getEventsMap().forEach( (value, name) => {
const li = document.createElement('li');
li.innerHTML = `
@@ -201,11 +195,22 @@ chrome.runtime.getBackgroundPage( (backgroundPage) =>
});
+ if( errorHandlers.ifNotControlled ) {
+ console.log('ADDING');
+ document.getElementById('which-extension').innerHTML = backgroundPage.utils.messages.whichExtensionHtml();
+ document.querySelectorAll('.if-not-controlled').forEach( (node) => {
+
+ node.style.display = 'block';
+
+ });
+ }
setStatusTo('');
+
if (antiCensorRu.ifFirstInstall) {
const id = antiCensorRu.currentPacProviderKey || 'none';
document.querySelector('#update-' + id).click();
}
+ document.documentElement.style.display = '';
})
);
diff --git a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/keep-links-clickable.js b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/keep-links-clickable.js
index 31ce3c5..509abd3 100644
--- a/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/keep-links-clickable.js
+++ b/extensions/chromium/minimalistic-pac-setter/extension/pages/choose-pac-provider/keep-links-clickable.js
@@ -4,31 +4,35 @@ In popup links are not clickable at all, fix it.
On other pages "chrome://" links are not clickable, fix it.
Use only if really required because of performance penalty.
*/
+{
-const target = document.getElementById('status');
+ const target = document.documentElement;
-const updateLinks = () => {
+ const updateLinks = () => {
- const links = document.querySelectorAll('a:not([href=""])');
- for (let i = 0; i < links.length; i++) {
- const ln = links[i];
- const location = ln.href;
- ln.onclick = function() {
+ console.log('UPDATE');
+ const links = document.querySelectorAll('a:not([href=""])');
+ for (let i = 0; i < links.length; i++) {
+ const ln = links[i];
+ const location = ln.href;
+ ln.onclick = function() {
- chrome.tabs.create({active: !this.dataset.inBg, url: location});
- return false;
+ chrome.tabs.create({active: !this.dataset.inBg, url: location});
+ return false;
- };
- }
+ };
+ }
-};
+ };
-new MutationObserver( updateLinks )
- .observe(target, {
- attributes: false,
- subtree: true,
- childList: true,
- characterData: false,
- });
+ new MutationObserver( updateLinks )
+ .observe(target, {
+ attributes: true,
+ subtree: true,
+ childList: true,
+ characterData: false,
+ });
-document.addEventListener('DOMContentLoaded', updateLinks);
+ document.addEventListener('DOMContentLoaded', updateLinks);
+
+}