summaryrefslogtreecommitdiff
path: root/assets/js/common.js
blob: 6ccd25ce835457f417347a89550ff00496c815ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let style = document.createElement("style");

if (window.MistAndroid) {
    style.innerHTML =
    `:root {
        --android-navigation-bar: ${window.MistAndroid.getNavigationBarHeight()}px;
        --android-status-bar: ${window.MistAndroid.getStatusBarHeight()}px;
    }`;
} else {
    style.innerHTML =
    `:root {
        --android-navigation-bar: 0px;
        --android-status-bar: 0px;
    }`;
}

document.head.append(style);

if (navigator.userAgent.includes("MistNative/darwin")) {
    if (document.getElementById("native-css")) document.getElementById("native-css").disabled = false;
    document.body.classList.remove("crossplatform");
}