Merge branch 'development' into production

This commit is contained in:
ilyaigpetrov 2019-05-04 12:36:34 -05:00
commit f37539a19c
17 changed files with 191 additions and 63 deletions

View File

@ -189,7 +189,7 @@
return chrome.i18n.getMessage('noControl') +
` <a href="${ this.searchSettingsForUrl('proxy') }">
${ chrome.i18n.getMessage('which') }
${ chrome.i18n.getMessage('WhichQ') }
</a>`;
},

View File

@ -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: [

View File

@ -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"
}
}

View File

@ -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": "Поддержать"
}
}

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html style="display: none; will-change: contents, display">
<html style="visibility: hidden; will-change: contents, visibility">
<head>
<meta charset="utf-8">
<title>Настройки</title>

View File

@ -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"

View File

@ -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",

View File

@ -227,7 +227,10 @@ export default function getApp(theState) {
this.setStatusTo(
(<span>
<span style="color:red">
{err ? <span><span class="emoji">🔥</span> Ошибка!</span> : 'Некритичная oшибка.'}
{err
? <span><span class="emoji">🔥</span> {chrome.i18n.getMessage('Error')}!</span>
: `${chrome.i18n.getMessage('Non_critical_error')}.`
}
</span>
<br/>
<span style="font-size: 0.9em; color: darkred" dangerouslySetInnerHTML={{__html: messageHtml}}></span>

View File

@ -26,9 +26,10 @@ export default function getFooter() {
</section>
<footer class={scopedCss.controlRow + ' horFlex nowrap'}>
<input type="button" value="Готово" disabled={props.ifInputsDisabled} onClick={() => window.close()} />
<input type="button" value={chrome.i18n.getMessage('Finish')} disabled={props.ifInputsDisabled} onClick={() => window.close()} />
<a href="https://rebrand.ly/ac-donate">{chrome.i18n.getMessage('Donate')}</a>
<a data-in-bg="false" href="../troubleshoot/index.html">
Проблемы?
{chrome.i18n.getMessage('ProblemsQ')}
</a>
</footer>
</div>

View File

@ -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',
},

View File

@ -124,10 +124,10 @@ export default function getPacChooser(theState) {
const iddyToCheck = this.getCurrentProviderId();
return (
<div>
{props.flags.ifInsideOptionsPage && (<header>PAC-скрипт:</header>)}
{props.flags.ifInsideOptionsPage && (<header>{chrome.i18n.getMessage('PAC_script')}:</header>)}
<ul>
{
[...theState.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: 'Отключить'}].map((provConf) =>
[...theState.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: chrome.i18n.getMessage('Disable')}].map((provConf) =>
(<InfoLi
onClick={this.radioClickHandler}
conf={provConf}
@ -135,7 +135,7 @@ export default function getPacChooser(theState) {
name="pacProvider"
checked={iddyToCheck === provConf.key}
ifInputsDisabled={props.ifInputsDisabled}
nodeAfterLabel={<a href="" class={scopedCss.updateButton} onClick={this.updateClickHandler}>[обновить]</a>}
nodeAfterLabel={<a href="" class={scopedCss.updateButton} onClick={this.updateClickHandler}>[{chrome.i18n.getMessage('update')}]</a>}
/>)
)
}

View File

@ -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;

View File

@ -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 */

View File

@ -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();

View File

@ -5,10 +5,11 @@
<title>Устранение проблем</title>
</head>
<body>
<h1>Устранение проблем</h1>
<ol>
<li><a data-in-bg="false" href id="view-errors">Детали последних ошибок</a></li>
<li><a data-in-bg="false" href id="reset-settings">Сбросить настройки</a></li>
<li><a data-in-bg="false" href class="view-errors">Детали последних ошибок</a></li>
<li><a data-in-bg="false" href class="reset-settings">Сбросить настройки</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-support" target="_blank">Файл самопомощи</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-contact">Напишите нам!</a></li>
</ol>
@ -17,6 +18,19 @@
<li><a data-in-bg="false" href="https://rebrand.ly/ac-logs">Как прочитать логи?</a></li>
<li><a data-in-bg="false" href="../debug/index.html">Отладка PAC-скрипта</a></li>
</ol>
<hr/>
<h1>Troubleshooting</h1>
<ol>
<li><a data-in-bg="false" href class="view-errors">Details of last errors</a></li>
<li><a data-in-bg="false" href class="reset-settings">Reset settings</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-support" target="_blank">Troubleshoot guide (ru)</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-contact">Write to us!</a></li>
</ol>
<h2>Advanced</h2>
<ol>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-logs">How to read logs?</a></li>
<li><a data-in-bg="false" href="../debug/index.html">PAC-script debugging</a></li>
</ol>
<script src="./index.js"></script>
<script src="../lib/keep-links-clickable.js"></script>
</body>

View File

@ -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');
});
},
),
);

View File

@ -10,7 +10,7 @@ const pacUrls = [
];
const commonContext = {
version: '1.30',
version: '1.31',
anticensorityPacUrls: [
...pacUrls,
],