From df1bb35e87c20e9fc16ce17b8de236c880464289 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Tue, 29 Nov 2016 09:45:55 -0800 Subject: [PATCH] Fix triggering on install, make popup buttons invisible (fewer resizes) --- .../extension/pages/choose-pac-provider/index.html | 4 ++-- .../extension/pages/choose-pac-provider/index.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 f2bd9f2..ace9d0e 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 @@ -31,10 +31,10 @@ text-decoration: underline; } .checked-radio-panel { - display: none; + visibility: hidden; } input:checked ~ .checked-radio-panel { - display: inline; + visibility: visible; } footer { margin: 2em 1em 1em; 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 3033214..b860b8e 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 @@ -139,7 +139,7 @@ chrome://extensions › const li = document.createElement('li'); li.innerHTML = ` - [обновить]`; + [обновить]`; li.querySelector('.link-button').onclick = () => { conduct( @@ -183,7 +183,8 @@ chrome://extensions › setStatusTo(''); if (antiCensorRu.ifFirstInstall) { - currentProviderRadio().click(); + const id = antiCensorRu.currentPacProviderKey || 'none'; + document.querySelector('#update-' + id).click(); } });