mirror of
https://github.com/heyman/heynote.git
synced 2024-11-25 01:13:17 +01: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 currencyData = null
|
||||
|
||||
const Heynote = {
|
||||
platform: {
|
||||
let 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,
|
||||
isWindows: false,
|
||||
isLinux: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const Heynote = {
|
||||
platform: platform,
|
||||
|
||||
buffer: {
|
||||
async load() {
|
||||
|
Loading…
Reference in New Issue
Block a user