|
|
|
@ -39,9 +39,10 @@ function uuidv4() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setVHvar() { |
|
|
|
function setVHvar() { |
|
|
|
let vh = window.innerHeight * 0.01; |
|
|
|
var vh = window.innerHeight * 0.01; |
|
|
|
// Then we set the value in the --vh custom property to the root of the document
|
|
|
|
// Then we set the value in the --vh custom property to the root of the document
|
|
|
|
document.documentElement.style.setProperty('--vh', `${vh}px`); |
|
|
|
document.documentElement.style.setProperty('--vh', `${vh}px`); |
|
|
|
|
|
|
|
console.log("== new vh", vh) |
|
|
|
} |
|
|
|
} |
|
|
|
function mobileVHhack() { |
|
|
|
function mobileVHhack() { |
|
|
|
setVHvar(); |
|
|
|
setVHvar(); |
|
|
|
@ -52,4 +53,6 @@ function isAndroidMobile() { |
|
|
|
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1; |
|
|
|
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1; |
|
|
|
//&& ua.indexOf("mobile");
|
|
|
|
//&& ua.indexOf("mobile");
|
|
|
|
return isAndroid; |
|
|
|
return isAndroid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|