From 1d764ab85e9b7a2f835ed74f0e78a0110f8acd9d Mon Sep 17 00:00:00 2001 From: Daniel Jacobs Date: Mon, 12 Aug 2024 12:04:23 -0400 Subject: [PATCH] web: Don't install Flash plugin if it already exists --- web/packages/core/src/plugin-polyfill.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/packages/core/src/plugin-polyfill.ts b/web/packages/core/src/plugin-polyfill.ts index b9b0553f15af..b9fb4413bf77 100644 --- a/web/packages/core/src/plugin-polyfill.ts +++ b/web/packages/core/src/plugin-polyfill.ts @@ -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),