Revert "remove JS anchor behavior override"

This reverts commit aa89e76b049afdb595a0ba8314510a3e1d244af9.
Revert "always target _top in url links"

This reverts commit db0a65c9f3ea1b51649f060154a63a3060ba1f92.