diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Exceptions.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Exceptions.js index 7bf3f6d..3ee2c95 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Exceptions.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/Exceptions.js @@ -33,8 +33,13 @@ export default function getExceptions(theState) { }; - return ( -
+ return props.flags.ifInsideOptionsPage + ? ( +
+ Редактор исключений доступен только для вкладок. +
) + : + (
{createElement(ExcEditor, props)} diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js index 8904a66..e14fc40 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ModList.js @@ -41,7 +41,7 @@ export default function getModList(theState) { {createElement(ApplyMods, Object.assign({}, props, { - disabled: !this.state.ifChangesStashed, + disabled: !this.state.ifChangesStashed || props.ifInputsDisabled, onClick: () => { const oldMods = this.props.apis.pacKitchen.getPacMods(); 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 54a5d15..56787e3 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 @@ -2,7 +2,7 @@ import Inferno, { linkEvent } from 'inferno'; import Component from 'inferno-component'; import css from 'csjs-inject'; -export default function getTabPannel({ flags }) { +export default function getTabPannel({ flags, baseCss }) { const scopedCss = css` @@ -18,19 +18,17 @@ export default function getTabPannel({ flags }) { :root.ifInsideOptionsPage .tabContainer { padding-bottom: 0.6em; } - :root.ifInsideOptionsPage .tabContainer:not(:last-child), - .underlined { + :root.ifInsideOptionsPage nav.mainNav > div:not(:last-child) { border-bottom: 1px solid var(--cr-options-headline); } + :root.ifInsideOptionsPage .navLabels { display: none; } /* HIDE starts. */ - :root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section, - /* One button shared between two sections: */ - :root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + #apply-mods-section + :root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section { /* Hide, but preclude width resizes. */ height: 0px !important; @@ -45,9 +43,7 @@ export default function getTabPannel({ flags }) { transform: scaleY(0) !important; } - :root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section *, - /* One button shared between two sections: */ - :root:not(.ifInsideOptionsPage) .mainNav #apply-mods-section * // TODO + :root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section * { margin-top: 0 !important; margin-bottom: 0 !important; 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 0eb07cf..cc61dd6 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 @@ -1,7 +1,7 @@ export default function append(document, { flags }) { // innerText converts \n to
, so: - document.head.querySelector('style').innerHTML = ` + document.querySelector('style').innerHTML = ` /* GLOBAL VARIABLES */ :root { 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 f9dd9e1..af5329d 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 @@ -3,6 +3,7 @@ import Inferno from 'inferno'; import createElement from 'inferno-create-element'; import appendGlobalCss from './globalCss'; +import css from 'csjs-inject'; import getApp from './components/App'; chrome.runtime.getBackgroundPage( (bgWindow) => @@ -40,6 +41,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) => // STATE DEFINED, COMPOSE. appendGlobalCss(document, theState); + // Extendable css classes. Inferno.render( createElement(getApp(theState), theState),