First of all, let's realize that Outlook web add-ins work under the context of the currently selected item only in Outlook. So, each time you select an item your contextual add-in must re-evaluate conditions to activate.
You may also consider implementing a pinnable task pane where you could handle the ItemChanged event. See Implement a pinnable task pane in Outlook for more information. So, if the take pane was loaded and pinned you can just handle the ItemChanged event and process a newly selected item with relying on contextual activations.
The event-based activation can also be helpful depending on your demands. See Configure your Outlook add-in for event-based activation for more information.
If none of the provided options suits your needs I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .
ItemChangedevent allows to grab all urls and log them to the task pane.