browser: simplify no implicit access to L object

Change-Id: I59668b527af914a339bb9799f25edfad5584ea31
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2023-08-22 07:38:19 -04:00 committed by Caolán McNamara
parent e2beaab73a
commit 1ca7a26b9b

View file

@ -397,24 +397,24 @@ window.app = {
if (global.mode.isChromebook())
return false;
if (global.L.Browser.mobile && L.Browser.cypressTest) {
if (global.L.Browser.mobile && global.L.Browser.cypressTest) {
return true;
}
return L.Browser.mobile && (screen.width < 768 || screen.height < 768);
return global.L.Browser.mobile && (screen.width < 768 || screen.height < 768);
},
// Mobile device with big screen size.
isTablet: function() {
if (global.mode.isChromebook())
return false;
return L.Browser.mobile && !global.mode.isMobile();
return global.L.Browser.mobile && !global.mode.isMobile();
},
isDesktop: function() {
if (global.mode.isChromebook())
return true;
return !L.Browser.mobile;
return !global.L.Browser.mobile;
},
getDeviceFormFactor: function() {
if (global.mode.isMobile())