options: #advanced block is collapsed by default in Chrome
* Chrome has a hardcoded limit for the options dialog height at 640px and it's better to avoid the vertical scrollbar on smaller displays * Chrome users are less likely to change the weird stuff we have there
This commit is contained in:
parent
7bde873b3b
commit
df80a84469
|
@ -104,7 +104,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="block">
|
<div class="block collapsible" id="advanced">
|
||||||
<h1 i18n-text="optionsAdvanced"></h1>
|
<h1 i18n-text="optionsAdvanced"></h1>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -50,6 +50,14 @@ body {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collapsed, .collapsible h1 {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collapsed .items {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -4,6 +4,16 @@ setupLivePrefs();
|
||||||
setupRadioButtons();
|
setupRadioButtons();
|
||||||
enforceInputRange($('#popupWidth'));
|
enforceInputRange($('#popupWidth'));
|
||||||
|
|
||||||
|
if (!FIREFOX && !OPERA) {
|
||||||
|
const block = $('#advanced');
|
||||||
|
block.classList.add('collapsed');
|
||||||
|
block.onclick = event => {
|
||||||
|
if (block.classList.contains('collapsed') || event.target.closest('h1')) {
|
||||||
|
block.classList.toggle('collapsed');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
document.onclick = e => {
|
document.onclick = e => {
|
||||||
const target = e.target.closest('[data-cmd]');
|
const target = e.target.closest('[data-cmd]');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user