Hide primary links in document preview

Using the JavaScript from the frontend toolkit hide the non-primary
links in the preview.

https://www.pivotaltracker.com/story/show/67553858