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;
}
.checked-radio-panel {
display: none;
visibility: hidden;
}
input:checked ~ .checked-radio-panel {
display: inline;
visibility: visible;
}
footer {
margin: 2em 1em 1em;

View File

@ -139,7 +139,7 @@ chrome://extensions</a>
const li = document.createElement('li');
li.innerHTML = `<input type="radio" name="pacProvider" id="${providerKey}">
<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 =
() => {
conduct(
@ -183,7 +183,8 @@ chrome://extensions</a>
setStatusTo('');
if (antiCensorRu.ifFirstInstall) {
currentProviderRadio().click();
const id = antiCensorRu.currentPacProviderKey || 'none';
document.querySelector('#update-' + id).click();
}
});