Skip to content

Commit

Permalink
fix: add better compatibility detection for flash
Browse files Browse the repository at this point in the history
fixes #117
  • Loading branch information
bryanbraun committed Feb 3, 2024
1 parent 7f2f5ca commit 81d1f61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions site/js/updatePanes.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ function isCompatible(selectedId) {
return Modernizr.smil && (browserName !== 'Safari');
}
if (selectedId === 'flash') {
// Flash is now deprecated in all browsers.
return false;
// Flash is deprecated in most browsers but can still be emulated by tools like
// https://ruffle.rs. Both emulators and legacy flash plugins should be detected
// by the check below (see: https://stackoverflow.com/a/42815720/1154642).
return !!navigator.plugins.namedItem("Shockwave Flash");

Check failure on line 93 in site/js/updatePanes.js

View workflow job for this annotation

GitHub Actions / build

Strings must use singlequote
}
if (selectedId === 'p5') {
return Modernizr.webgl;
Expand Down

0 comments on commit 81d1f61

Please sign in to comment.