1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-19 11:18:42 +02:00

fix #3032 -- hopefully

This commit is contained in:
gorhill 2017-09-18 10:52:30 -04:00
parent 6ca9825c61
commit b677600637
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -46,7 +46,15 @@ if ( /[\?&]fullsize=1/.test(window.location.search) ) {
}
// Mobile device?
if ( /[\?&]mobile=1/.test(window.location.search) ) {
// https://github.com/gorhill/uBlock/issues/3032
// - If at least one of the window's viewport dimension is larger than the
// corresponding device's screen dimension, assume uBO's popup panel sits in
// its own tab.
if (
/[\?&]mobile=1/.test(window.location.search) ||
window.innerWidth >= window.screen.availWidth ||
window.innerHeight >= window.screen.availHeight
) {
document.body.classList.add('mobile');
}