Skip to content
Snippets Groups Projects
Commit 39dcbdad authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Add rel="noopener" to google book urls.

parent 3fada5ce
No related merge requests found
......@@ -38,12 +38,14 @@ function getHTPreviews(keys) {
}
function applyPreviewUrl($link, url) {
// Update the preview button:
$link.attr('href', url).removeClass('hidden');
// Update the preview button:
$link.attr('href', url).removeClass('hidden')
.attr('rel', 'noopener'); // Performance improvement
// Update associated record thumbnail, if any:
// Update associated record thumbnail, if any:
$link.parents('.result,.record')
.find('.recordcover[data-linkpreview="true"]').parents('a').attr('href', url);
.find('.recordcover[data-linkpreview="true"]').parents('a').attr('href', url)
.attr('rel', 'noopener');
}
function processBookInfo(booksInfo, previewClass, viewOptions) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment