Once Komoot loads the initial page, subsequent navigation is done using client-side routing.
The script runs fine if we navigate directly to the URL we want to script to run on, but if we navigate to the page using the Komoot site, it doesn't.
Add a mutation observer or watch for changes to the URL so we can remount our custom components when the page changes.
Once Komoot loads the initial page, subsequent navigation is done using client-side routing.
The script runs fine if we navigate directly to the URL we want to script to run on, but if we navigate to the page using the Komoot site, it doesn't.
Add a mutation observer or watch for changes to the URL so we can remount our custom components when the page changes.