Skip to content

Commit be423dc

Browse files
committed
improved WebGL support message
1 parent 69d3535 commit be423dc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/CheckWebGLSupport.astro

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11

22
<!-- A warning message box to inform the user that their browser does not support WebGL 2.0 -->
33
<dialog class="warning-message-box">
4-
Sorry, this website will not work on this device.
4+
Unsupported device.
5+
<br/><br/>
56
This device is missing a required WebGL extension.
6-
This is a known <a href="https://github.com/openlayers/openlayers/issues/15581">issue</a> with some Android devices.
7+
This is a known <a href="https://github.com/openlayers/openlayers/issues/15581">issue</a> with some Android phones.
8+
Data maps will not render correctly.
79

810
<br/><br/>
911
Please visit from another device.<br/>
@@ -33,7 +35,11 @@ function WebGL_Has_OES_texture_float() {
3335
document.addEventListener('DOMContentLoaded', () => {
3436
if (!WebGL_Has_OES_texture_float()) {
3537
const el = document.querySelector('.warning-message-box') as HTMLDialogElement;
36-
if (el) el.showModal();
38+
if (!el) return;
39+
// Set 5 second delay then show the modal
40+
setTimeout(() => {
41+
el.showModal();
42+
}, 5000);
3743
}
3844
});
3945
</script>

0 commit comments

Comments
 (0)