Skip to content

Commit

Permalink
web: Don't install Flash plugin if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjacobs authored and torokati44 committed Aug 12, 2024
1 parent 2428c37 commit 1d764ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/packages/core/src/plugin-polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ declare global {
* @param plugin The plugin to install
*/
export function installPlugin(plugin: RufflePlugin): void {
if (navigator.plugins.namedItem("Shockwave Flash")) {
return;
}
if (!("install" in navigator.plugins) || !navigator.plugins["install"]) {
Object.defineProperty(navigator, "plugins", {
value: new RufflePluginArray(navigator.plugins),
Expand Down

0 comments on commit 1d764ab

Please sign in to comment.