@@ -175,24 +175,35 @@ async function enable() {
175175 return ;
176176 }
177177 if ( ! ( await contentScriptRegistered ( ) ) ) {
178+ const excludeMatches = [
179+ "https://sso.godaddy.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/7146
180+ "https://authentication.td.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/2158
181+ "https://*.twitch.tv/*" , // See https://github.com/ruffle-rs/ruffle/pull/8150
182+ "https://www.tuxedocomputers.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/11906
183+ "https://*.taobao.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/12650
184+ "https://*.time4learning.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/16186
185+ "https://*.edgenuity.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/16186
186+ "https://www.chewy.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/18265
187+ "https://*.duosecurity.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/18299
188+ "https://*.tiktok.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/20250
189+ ] ;
178190 await utils . scripting . registerContentScripts ( [
191+ {
192+ id : "ruffle" ,
193+ js : [ "dist/ruffle.js" ] ,
194+ persistAcrossSessions : true ,
195+ matches : [ "<all_urls>" ] ,
196+ excludeMatches,
197+ runAt : "document_start" ,
198+ allFrames : true ,
199+ world : "MAIN" ,
200+ } ,
179201 {
180202 id : "plugin-polyfill" ,
181203 js : [ "dist/pluginPolyfill.js" ] ,
182204 persistAcrossSessions : true ,
183205 matches : [ "<all_urls>" ] ,
184- excludeMatches : [
185- "https://sso.godaddy.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/7146
186- "https://authentication.td.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/2158
187- "https://*.twitch.tv/*" , // See https://github.com/ruffle-rs/ruffle/pull/8150
188- "https://www.tuxedocomputers.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/11906
189- "https://*.taobao.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/12650
190- "https://*.time4learning.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/16186
191- "https://*.edgenuity.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/16186
192- "https://www.chewy.com/*" , // See https://github.com/ruffle-rs/ruffle/issues/18265
193- "https://*.duosecurity.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/18299
194- "https://*.tiktok.com/*" , // See https://github.com/ruffle-rs/ruffle/pull/20250
195- ] ,
206+ excludeMatches,
196207 runAt : "document_start" ,
197208 allFrames : true ,
198209 world : "MAIN" ,
@@ -222,7 +233,7 @@ async function disable() {
222233 }
223234 if ( await contentScriptRegistered ( ) ) {
224235 await utils . scripting . unregisterContentScripts ( {
225- ids : [ "plugin-polyfill" , "4399" ] ,
236+ ids : [ "ruffle" , " plugin-polyfill", "4399" ] ,
226237 } ) ;
227238 }
228239 await disableSWFTakeover ( ) ;
0 commit comments