Hi Orion team,
First of all, I love what you are doing with Orion. Thank you for your work!
I make a small extension, BetterTrooper, that opens the battle replays of a browser game in a faster player. On Orion for macOS it installs from the Chrome Web Store, but when it redirects a page, the page freezes: its content stops responding, while the browser itself keeps working. This only happens with the extension installed.
Steps to reproduce
- Install BetterTrooper from the Chrome Web Store: https://chromewebstore.google.com/detail/bettertrooper/dcmikmghpjleohepnoiojnhfjblcmmdc
- Open a battle replay of the game, for example https://plux1.trooperstest.gued.es/b/fview/13449126
- At the moment of the redirect, the page freezes.
Side note: the redirect does reach BetterTrooper, but with a wrong address, https://bettertrooper.milvintsiss.com/b/fview/13449126?og_army=plux1&via=extundefined. When an optional capture group of regexFilter does not match (here the fragment, (#.*)?), regexSubstitution writes undefined in its place, where Chrome writes nothing. Our page ignores that parameter, so this alone should not freeze it.
The extension (Manifest V3, no background script)
- permissions:
declarativeNetRequestWithHostAccess
- host_permissions:
*://*.trooperstest.gued.es/*, https://bettertrooper.milvintsiss.com/*
- one static ruleset with
main_frame redirects using regexFilter and regexSubstitution, for example:
{
"id": 1,
"priority": 1,
"condition": {
"regexFilter": "^https?://([a-z0-9-]+)\\.trooperstest\\.gued\\.es/b/fview/([0-9]+)/?(#.*)?$",
"isUrlFilterCaseSensitive": false,
"resourceTypes": ["main_frame"]
},
"action": {
"type": "redirect",
"redirect": { "regexSubstitution": "https://bettertrooper.milvintsiss.com/b/fview/\\2?og_army=\\1&via=ext\\3" }
}
}
- its popup switch adds or removes a dynamic
allow rule (updateDynamicRules).
BetterTrooper has no Safari version on the Mac (its Safari version is an iPhone and iPad app), so I could not compare with Safari there. On iOS, its redirects do not happen at all: https://orionfeedback.org/d/14797.
Thanks again!
The page is redirected to BetterTrooper and loads, as in Chrome: https://bettertrooper.milvintsiss.com/b/fview/13449126?og_army=plux1&via=ext
Orion 1.1.3 (152), WebKit 619.1.11.111.2, macOS 13.7.8 (22H730), iMac20,2
Ventura (13)