Move height fix into initPopup so it runs on unsupported pages
This commit is contained in:
parent
04084864cc
commit
18a9e26668
7
popup.js
7
popup.js
|
@ -37,6 +37,10 @@ function initPopup(url) {
|
|||
document.body.style.width =
|
||||
Math.max(200, Math.min(800, Number(localStorage.popupWidth) || 246)) + 'px';
|
||||
|
||||
// force Chrome to resize the popup
|
||||
document.body.style.height = '10px';
|
||||
document.documentElement.style.height = '10px';
|
||||
|
||||
// action buttons
|
||||
$('#disableAll').onchange = () =>
|
||||
installed.classList.toggle('disabled', prefs.get('disableAll'));
|
||||
|
@ -128,9 +132,6 @@ function showStyles(styles) {
|
|||
}
|
||||
installed.appendChild(fragment);
|
||||
}
|
||||
// force Chrome to resize the popup
|
||||
document.body.style.height = '10px';
|
||||
document.documentElement.style.height = '10px';
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user