1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

Test against window.innerWidth to toggle vertical layout

This commit is contained in:
Raymond Hill 2020-05-07 15:24:39 -04:00
parent 7fb3ee67d6
commit 2d960cf530
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1178,7 +1178,7 @@ const getPopupData = async function(tabId) {
const main = document.getElementById('main');
const firewall = document.getElementById('firewall');
const minWidth = (main.offsetWidth + firewall.offsetWidth) / 1.1;
if ( document.body.offsetWidth < minWidth ) {
if ( window.innerWidth < minWidth ) {
root.classList.remove('desktop');
} else {
const sticky = document.getElementById('sticky');