I agree that the manual way is annoying, but the only other way around it is replacing the js generated links with actual anchors. They only need to be added to the list when a page actually tries to use them as if there are in the page.