Skip to content

Commit 3694539

Browse files
committed
Check on SAB.
1 parent b654cb7 commit 3694539

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

index.html

+5-6
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,14 @@ <h2>PyScript is...</h2>
317317
<!-- END HEAP INTEGRATION -->
318318
<script>
319319
// It's a hack.
320-
if(
321-
navigator.userAgent.includes("Firefox") &&
322-
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
323-
324-
) {
320+
try{
321+
var sab = new SharedArrayBuffer(1024);
322+
if(sab===undefined)throw new Error('not supported')
323+
}
324+
catch(e){
325325
document.getElementById("new-terminal").style.display = "none";
326326
document.getElementById("old-terminal").style.display = "block";
327327
}
328-
329328
</script>
330329
</body>
331330
</html>

0 commit comments

Comments
 (0)