Skip to content

Commit

Permalink
kick out safari users early because apple have broken bento
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Sep 18, 2024
1 parent 98c3b41 commit f499b3f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion public/bento.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,21 @@ async function registerServiceWorker() {
}
}
}

registerServiceWorker()
if (navigator.userAgent.match(/18\.\d+ Safari/)) {
document.write(/*html*/ `
<p>
Sorry! Apple has broken <b>bento</b> in the latest version of Safari
by making it impossible to share an array buffer larger than 906404 bytes.
</p>
<p>
It'll be fixed in a few months, but until then I am so sorry to say there is
no way to make <b>bento</b> work on Safari. 😭
</p>
`)
throw new (class SafariError extends Error {})("Safari")
}

import * as sounds from "./sounds/sounds.js"
import * as graphics from "./graphics/graphics.js"
Expand Down

0 comments on commit f499b3f

Please sign in to comment.