Hi Brian,
Unfortunately behaviors run after link extraction, so you wouldn’t be able to just rewrite the href alone.
There’s an issue in the crawler GitHub repo in which we discussed adding a command line/YAML option for the crawler to specify selectors for extracting links. If this were implemented, it would make your task easier, as no behavior would be needed at all. Not sure if you’d have the development bandwidth to submit a PR for it: Specifying selectors for extracting links. · Issue #217 · webrecorder/browsertrix-crawler · GitHub. If not I could see if it could fit it into one of our next sprints.
Otherwise, likely your best bet at the moment is the first approach of using a behavior to gather and click on the links. Do the pop-up windows prevent your behavior from working as expected, or are you more concerned about the memory implications of keeping windows open? @ilya likely has a better idea on what is possible with the current utility methods