Fix triggering on install, make popup buttons invisible (fewer resizes)

This commit is contained in:
Ilya Ig. Petrov 2016-11-29 09:45:55 -08:00
parent 77a88e5778
commit df1bb35e87
2 changed files with 5 additions and 4 deletions

View File

@ -31,10 +31,10 @@
text-decoration: underline; text-decoration: underline;
} }
.checked-radio-panel { .checked-radio-panel {
display: none; visibility: hidden;
} }
input:checked ~ .checked-radio-panel { input:checked ~ .checked-radio-panel {
display: inline; visibility: visible;
} }
footer { footer {
margin: 2em 1em 1em; margin: 2em 1em 1em;

View File

@ -139,7 +139,7 @@ chrome://extensions</a>
const li = document.createElement('li'); const li = document.createElement('li');
li.innerHTML = `<input type="radio" name="pacProvider" id="${providerKey}"> li.innerHTML = `<input type="radio" name="pacProvider" id="${providerKey}">
<label for="${providerKey}">${providerKey}</label> <label for="${providerKey}">${providerKey}</label>
<a href class="link-button checked-radio-panel">[обновить]</a>`; <a href class="link-button checked-radio-panel" id="update-${providerKey}">[обновить]</a>`;
li.querySelector('.link-button').onclick = li.querySelector('.link-button').onclick =
() => { () => {
conduct( conduct(
@ -183,7 +183,8 @@ chrome://extensions</a>
setStatusTo(''); setStatusTo('');
if (antiCensorRu.ifFirstInstall) { if (antiCensorRu.ifFirstInstall) {
currentProviderRadio().click(); const id = antiCensorRu.currentPacProviderKey || 'none';
document.querySelector('#update-' + id).click();
} }
}); });