forked from cybrespace/pinafore
Make external links open in new tab (#892)
This commit is contained in:
parent
ef44c19e8a
commit
cb35a088f4
|
@ -111,6 +111,9 @@
|
|||
} else if (anchor.getAttribute('rel') === 'nofollow noopener') {
|
||||
anchor.setAttribute('title', href)
|
||||
}
|
||||
if (anchor.getAttribute('href')[0] !== '/' || anchor.getAttribute('href')[1] === '/') {
|
||||
anchor.setAttribute('target', '_blank')
|
||||
}
|
||||
}
|
||||
stop('hydrateContent')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue