From b68151c9987e1d3aaff2961bf7af547d757ff921 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 15 Apr 2019 07:56:39 +0000 Subject: [PATCH 1/7] Bump 0.0.1.31 --- .../chromium/runet-censorship-bypass/src/templates-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/templates-data.js b/extensions/chromium/runet-censorship-bypass/src/templates-data.js index b17b3f2..36db837 100644 --- a/extensions/chromium/runet-censorship-bypass/src/templates-data.js +++ b/extensions/chromium/runet-censorship-bypass/src/templates-data.js @@ -10,7 +10,7 @@ const pacUrls = [ ]; const commonContext = { - version: '1.30', + version: '1.31', anticensorityPacUrls: [ ...pacUrls, ], From 186ca1bdb4e05e184a42f187904e3085012a5a1f Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 09:35:08 -0500 Subject: [PATCH 2/7] Make grep insensetive --- extensions/chromium/runet-censorship-bypass/grep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/grep.sh b/extensions/chromium/runet-censorship-bypass/grep.sh index 9927a84..bbca8a7 100755 --- a/extensions/chromium/runet-censorship-bypass/grep.sh +++ b/extensions/chromium/runet-censorship-bypass/grep.sh @@ -1 +1 @@ -grep -r "$@" ./*.js ./src --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=dist +grep -ir "$@" ./*.js ./src --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=dist From 8432bc65de636f031025a2399cd7b717931055d8 Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 09:51:52 -0500 Subject: [PATCH 3/7] Update babel-related packages, fix license for the options page builder --- .../pages/options/package-lock.json | 69 +++++++++++-------- .../pages/options/package.json | 8 +-- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package-lock.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package-lock.json index 9f0b9f7..aa90fd1 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package-lock.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package-lock.json @@ -231,9 +231,9 @@ } }, "babel-loader": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.4.tgz", - "integrity": "sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.5.tgz", + "integrity": "sha512-iCHfbieL5d1LfOQeeVJEUyD9rTwBcP/fcEbRCfempxTDuqrKpu0AZjLAQHEQa3Yqyj9ORKe2iHfoj4rHLf7xpw==", "dev": true, "requires": { "find-cache-dir": "^1.0.0", @@ -251,14 +251,10 @@ } }, "babel-plugin-dynamic-import-webpack": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-webpack/-/babel-plugin-dynamic-import-webpack-1.0.2.tgz", - "integrity": "sha512-uJtIdcqcphnuv18bl7WOZeIe6JyEGV/FdI6NIxsUNR49S0kwomgrVB4tzFyxn3OMUuf8YJOonUpPKHrfu8MZ4g==", - "dev": true, - "requires": { - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-template": "^6.26.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-webpack/-/babel-plugin-dynamic-import-webpack-1.1.0.tgz", + "integrity": "sha512-Q/Vxl3zRwC5/DMyg97Ey2UD/f7ApvO+0zXgzwT3G2N7oajGFroqcUEmXZ23QXJsr0Y+DBVNK57saaUnQhCpllA==", + "dev": true }, "babel-plugin-inferno": { "version": "3.5.1", @@ -276,12 +272,6 @@ } } }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", - "dev": true - }, "babel-plugin-syntax-flow": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", @@ -2484,14 +2474,37 @@ "dev": true }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, "locate-path": { @@ -2526,9 +2539,9 @@ } }, "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { "pify": "^3.0.0" @@ -2784,9 +2797,9 @@ } }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { "p-try": "^1.0.0" diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package.json index b8fc1fb..3ac02bc 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/package.json @@ -1,12 +1,12 @@ { - "name": "hello-react", + "name": "options-page-builder", "version": "1.0.0", "main": "index.js", - "license": "MIT", + "license": "GPLv3", "devDependencies": { "babel-cli": "^6.24.1", - "babel-loader": "^7.1.4", - "babel-plugin-dynamic-import-webpack": "^1.0.2", + "babel-loader": "^7.1.5", + "babel-plugin-dynamic-import-webpack": "^1.1.0", "babel-preset-flow": "^6.23.0", "babel-preset-react": "^6.24.1", "concat-stream": "^1.6.2", From db4eb6767d0294a6ffca81314850a0bccbc05c02 Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 09:55:38 -0500 Subject: [PATCH 4/7] Fix tab captions not fitting on options page in the header --- .../extension-common/pages/options/src/components/TabPanel.js | 2 +- .../src/extension-common/pages/options/src/globalCss.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/TabPanel.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/TabPanel.js index 401c0bd..dc09327 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/TabPanel.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/TabPanel.js @@ -54,7 +54,7 @@ export default function getTabPannel({ flags, baseCss }) { .navLabels { background-color: var(--cr-grey-panel); text-align: center; - min-width: 24em; + min-width: 25em; } .navLabels li label { display: inline-block; diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/globalCss.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/globalCss.js index b116b09..589e3eb 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/globalCss.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/globalCss.js @@ -17,7 +17,7 @@ export default function append(document, { flags }) { // options page width may be jerking // in size when scrolling is showed. ? 'width: 20em' - : 'max-width: 24em;' } + : 'max-width: 25em;' } } /* BASE ELEMENTS */ From 4beb6e9fcb80bb6e249a017955d91fef7d68b58f Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 12:12:51 -0500 Subject: [PATCH 5/7] Make grep sensitive again --- extensions/chromium/runet-censorship-bypass/grep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/grep.sh b/extensions/chromium/runet-censorship-bypass/grep.sh index bbca8a7..9927a84 100755 --- a/extensions/chromium/runet-censorship-bypass/grep.sh +++ b/extensions/chromium/runet-censorship-bypass/grep.sh @@ -1 +1 @@ -grep -ir "$@" ./*.js ./src --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=dist +grep -r "$@" ./*.js ./src --exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=dist From 89f394b9a54749222d5e626a86dfd4ab5eb9835e Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 12:20:11 -0500 Subject: [PATCH 6/7] Fix options page not showing on Chrome 74 (Chromium 73 works fine) --- .../src/extension-common/pages/options/index.html | 2 +- .../src/extension-common/pages/options/src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/index.html b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/index.html index a19cb9a..4fe5f2c 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/index.html +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/index.html @@ -1,5 +1,5 @@  - + Настройки diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js index fd341e7..af9c72e 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/index.js @@ -49,7 +49,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) => ); // READY TO RENDER - const show = () => { document.documentElement.style.display = 'initial'; }; + const show = () => { document.documentElement.style.visibility = 'initial'; }; if (theState.flags.ifInsideOptionsPage) { show(); From 60ebdae57f534c070c255f5de011f20a42a28cc5 Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 4 May 2019 12:20:54 -0500 Subject: [PATCH 7/7] Provide basic English translation, add donate button --- .../src/extension-common/00-init-apis.js | 2 +- ...c-pac-script-with-pac-provider-api.tmpl.js | 6 +-- .../_locales/en/messages.tmpl.json | 47 ++++++++++++++++++- .../_locales/ru/messages.tmpl.json | 47 ++++++++++++++++++- .../pages/options/src/components/App.js | 5 +- .../pages/options/src/components/Footer.js | 5 +- .../pages/options/src/components/Main.js | 10 ++-- .../options/src/components/PacChooser.js | 6 +-- .../pages/troubleshoot/index.html | 18 ++++++- .../pages/troubleshoot/index.js | 21 ++++++--- 10 files changed, 141 insertions(+), 26 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js index beb0aca..7c699ac 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js @@ -189,7 +189,7 @@ return chrome.i18n.getMessage('noControl') + ` - ${ chrome.i18n.getMessage('which') } + ${ chrome.i18n.getMessage('WhichQ') } `; }, diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index b554265..d47a559 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -198,7 +198,7 @@ // Distinct keys are needed if you want to check if a given // provider is this or that (distinct it from others). distinctKey: 'Antizapret', - label: 'Антизапрет', + label: chrome.i18n.getMessage('Antizapret'), desc: \`Альтернативный PAC-скрипт от стороннего разработчика. Охватывет меньше сайтов. Блокировка определяется по доменному имени. @@ -208,7 +208,7 @@ }, Антицензорити: { distinctKey: 'Anticensority', - label: 'Антицензорити', + label: chrome.i18n.getMessage('Anticensority'), desc: \`Основной PAC-скрипт от автора расширения. Охватывает больше сайтов. Блокировка определятся по доменному имени или IP адресу. @@ -224,7 +224,7 @@ }, onlyOwnSites: { distinctKey: 'onlyOwnSites', - label: 'Только свои сайты и свои прокси', + label: chrome.i18n.getMessage('Only_own_sites_and_only_own_proxies'), desc: 'Проксируются только добавленные вручную сайты через СВОИ вручную добавленные прокси или через локальный Tor.', order: 99, pacUrls: [ diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json index 7188c02..339d0d8 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json @@ -11,7 +11,52 @@ "noControl": { "message": "Other extension controls proxy!" }, - "which": { + "WhichQ": { "message": "Which?" + }, + "update": { + "message": "update" + }, + "ProblemsQ": { + "message": "Problems?" + }, + "Finish": { + "message": "OK" + }, + "Disable": { + "message": "Disable" + }, + "Only_own_sites_and_only_own_proxies": { + "message": "Only own sites and only own proxies" + }, + "Antizapret": { + "message": "Antizapret" + }, + "Anticensority": { + "message": "Anticensority" + }, + "PAC_script": { + "message": "PAC-script" + }, + "Exceptions": { + "message": "Exceptions" + }, + "Own_proxies": { + "message": "Own proxies" + }, + "Modifiers": { + "message": "Modifiers" + }, + "Notifications": { + "message": "Notifications" + }, + "Error": { + "message": "Error" + }, + "Non_critical_error": { + "message": "Non-critical error" + }, + "Donate": { + "message": "Donate" } } diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json index acfc907..fbdc6aa 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json @@ -11,7 +11,52 @@ "noControl": { "message": "Другое расширение контролирует настройки прокси!" }, - "which": { + "WhichQ": { "message": "Какое?" + }, + "update": { + "message": "обновить" + }, + "ProblemsQ": { + "message": "Проблемы?" + }, + "Finish": { + "message": "Готово" + }, + "Disable": { + "message": "Отключить" + }, + "Only_own_sites_and_only_own_proxies": { + "message": "Только свои сайты и свои прокси" + }, + "Antizapret": { + "message": "Антизапрет" + }, + "Anticensority": { + "message": "Антицензорити" + }, + "PAC_script": { + "message": "PAC-скрипт" + }, + "Exceptions": { + "message": "Исключения" + }, + "Own_proxies": { + "message": "Свои прокси" + }, + "Modifiers": { + "message": "Модификаторы" + }, + "Notifications": { + "message": "Уведомления" + }, + "Error": { + "message": "Ошибка" + }, + "Non_critical_error": { + "message": "Некритичная ошибка" + }, + "Donate": { + "message": "Поддержать" } } diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js index 2d16b76..edf4007 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js @@ -227,7 +227,10 @@ export default function getApp(theState) { this.setStatusTo( ( - {err ? 🔥 Ошибка! : 'Некритичная oшибка.'} + {err + ? 🔥 {chrome.i18n.getMessage('Error')}! + : `${chrome.i18n.getMessage('Non_critical_error')}.` + }
diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Footer.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Footer.js index 238e26c..5d1b149 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Footer.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Footer.js @@ -26,9 +26,10 @@ export default function getFooter() { diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Main.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Main.js index ca68cdf..69043bf 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Main.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Main.js @@ -144,17 +144,17 @@ export default function getMain(theState) { return createElement(TabPanel, Object.assign({}, props, { tabs: [ { - label: 'PAC-скрипт', + label: chrome.i18n.getMessage('PAC_script'), content: createElement(PacChooser, props), key: 'pacScript', }, { - label: 'Исключения', + label: chrome.i18n.getMessage('Exceptions'), content: createElement(Exceptions, props), key: 'exceptions', }, { - label: 'Свои прокси', + label: chrome.i18n.getMessage('Own_proxies'), content: createElement( ModList, Object.assign({}, props, { @@ -168,7 +168,7 @@ export default function getMain(theState) { key: 'ownProxies', }, { - label: 'Модификаторы', + label: chrome.i18n.getMessage('Modifiers'), content: createElement( ModList, Object.assign({}, props, { @@ -183,7 +183,7 @@ export default function getMain(theState) { key: 'applyMods', }, { - label: 'Уведомления', + label: chrome.i18n.getMessage('Notifications'), content: createElement(Notifications, props), key: 'notifications', }, diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js index cb9b019..b762fd9 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/PacChooser.js @@ -124,10 +124,10 @@ export default function getPacChooser(theState) { const iddyToCheck = this.getCurrentProviderId(); return (
- {props.flags.ifInsideOptionsPage && (
PAC-скрипт:
)} + {props.flags.ifInsideOptionsPage && (
{chrome.i18n.getMessage('PAC_script')}:
)}
    { - [...theState.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: 'Отключить'}].map((provConf) => + [...theState.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: chrome.i18n.getMessage('Disable')}].map((provConf) => ([обновить]} + nodeAfterLabel={[{chrome.i18n.getMessage('update')}]} />) ) } diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.html b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.html index dd21ec2..23eada7 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.html +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.html @@ -5,10 +5,11 @@ Устранение проблем +

    Устранение проблем

      -
    1. Детали последних ошибок
    2. -
    3. Сбросить настройки
    4. +
    5. Детали последних ошибок
    6. +
    7. Сбросить настройки
    8. Файл самопомощи
    9. Напишите нам!
    @@ -17,6 +18,19 @@
  • Как прочитать логи?
  • Отладка PAC-скрипта
  • +
    +

    Troubleshooting

    +
      +
    1. Details of last errors
    2. +
    3. Reset settings
    4. +
    5. Troubleshoot guide (ru)
    6. +
    7. Write to us!
    8. +
    +

    Advanced

    +
      +
    1. How to read logs?
    2. +
    3. PAC-script debugging
    4. +
    diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.js index b58e862..7e1da8b 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/troubleshoot/index.js @@ -4,15 +4,22 @@ chrome.runtime.getBackgroundPage( (backgroundPage) => backgroundPage.apis.errorHandlers.installListenersOn( window, 'TRBL', () => { - document.getElementById('reset-settings').onclick = () => { + document.querySelectorAll('.reset-settings').forEach((el) => { - backgroundPage.localStorage.clear(); - chrome.storage.local.clear( () => chrome.runtime.reload() ); + el.onclick = () => { - }; + backgroundPage.localStorage.clear(); + chrome.storage.local.clear( () => chrome.runtime.reload() ); - document.getElementById('view-errors').onclick = () => - backgroundPage.apis.errorHandlers.viewError('all'); + }; + }); - }) + document.querySelectorAll('.view-errors').forEach((el) => { + + el.onclick = () => + backgroundPage.apis.errorHandlers.viewError('all'); + }); + + }, + ), );