added warning for unsupported browsers
This commit is contained in:
@@ -147,12 +147,33 @@ function setVh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getEngine() {
|
||||||
|
if ("MozAppearance" in document.documentElement.style)
|
||||||
|
{ return "gecko" }
|
||||||
|
|
||||||
|
if (
|
||||||
|
window.chrome &&
|
||||||
|
CSS.supports("-webkit-appearance", "none") &&
|
||||||
|
!CSS.supports("-apple-pay-button-style", "black")
|
||||||
|
) { return "blink" }
|
||||||
|
|
||||||
|
if (CSS.supports("-apple-pay-button-style", "black"))
|
||||||
|
{ return "webkit" }
|
||||||
|
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", async function () {
|
document.addEventListener("DOMContentLoaded", async function () {
|
||||||
setVh()
|
setVh()
|
||||||
debugPrint("currentPage", `${CURRENT_PAGE} ${Object.keys(PAGES)[CURRENT_PAGE + 1]}`)
|
debugPrint("currentPage", `${CURRENT_PAGE} ${Object.keys(PAGES)[CURRENT_PAGE + 1]}`)
|
||||||
|
|
||||||
startLoadingScreen()
|
startLoadingScreen()
|
||||||
|
|
||||||
|
let engine = getEngine()
|
||||||
|
if (!["gecko", "blink"].includes(engine))
|
||||||
|
{ alert("Your web browser is not supported, expect major issues.\nRendering engine:" + engine) }
|
||||||
|
|
||||||
setLoadingProgress("Fetching tips...")
|
setLoadingProgress("Fetching tips...")
|
||||||
|
|
||||||
await loadTips()
|
await loadTips()
|
||||||
|
|||||||
Reference in New Issue
Block a user