mirror of
https://github.com/heyman/heynote.git
synced 2025-06-21 18:11:35 +02:00
Set correct platform for the Heynote web app
This commit is contained in:
parent
6022356478
commit
6bbad360d4
@ -9,12 +9,30 @@ mediaMatch.addEventListener("change", async (event) => {
|
|||||||
let autoUpdateCallbacks = null
|
let autoUpdateCallbacks = null
|
||||||
let currencyData = null
|
let currencyData = null
|
||||||
|
|
||||||
const Heynote = {
|
let platform
|
||||||
platform: {
|
const uaPlatform = window.navigator?.userAgentData?.platform || window.navigator.platform
|
||||||
|
if (uaPlatform.indexOf("Win") !== -1) {
|
||||||
|
platform = {
|
||||||
|
isMac: false,
|
||||||
|
isWindows: true,
|
||||||
|
isLinux: false,
|
||||||
|
}
|
||||||
|
} else if (uaPlatform.indexOf("Linux") !== -1) {
|
||||||
|
platform = {
|
||||||
|
isMac: false,
|
||||||
|
isWindows: false,
|
||||||
|
isLinux: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
platform = {
|
||||||
isMac: true,
|
isMac: true,
|
||||||
isWindows: false,
|
isWindows: false,
|
||||||
isLinux: false,
|
isLinux: false,
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const Heynote = {
|
||||||
|
platform: platform,
|
||||||
|
|
||||||
buffer: {
|
buffer: {
|
||||||
async load() {
|
async load() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user