@@ -175,24 +175,35 @@ async function enable() {
175
175
return ;
176
176
}
177
177
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
+ ] ;
178
190
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
+ } ,
179
201
{
180
202
id : "plugin-polyfill" ,
181
203
js : [ "dist/pluginPolyfill.js" ] ,
182
204
persistAcrossSessions : true ,
183
205
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,
196
207
runAt : "document_start" ,
197
208
allFrames : true ,
198
209
world : "MAIN" ,
@@ -222,7 +233,7 @@ async function disable() {
222
233
}
223
234
if ( await contentScriptRegistered ( ) ) {
224
235
await utils . scripting . unregisterContentScripts ( {
225
- ids : [ "plugin-polyfill" , "4399" ] ,
236
+ ids : [ "ruffle" , " plugin-polyfill", "4399" ] ,
226
237
} ) ;
227
238
}
228
239
await disableSWFTakeover ( ) ;
0 commit comments