noreferrer everywhere

This commit is contained in:
Matt Hill
2021-09-03 14:24:27 -06:00
committed by Aiden McClelland
parent 3877e43b84
commit 9c6aaa64b8
12 changed files with 23 additions and 15 deletions

View File

@@ -23,6 +23,14 @@ export class MarkdownPage {
async ngOnInit () {
try {
this.content = await this.embassyApi.getStatic(this.contentUrl)
const links = document.links
for (let i = 0, linksLength = links.length; i < linksLength; i++) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank'
links[i].setAttribute('rel', 'noreferrer')
links[i].className += ' externalLink'
}
}
} catch (e) {
this.errToast.present(e)
} finally {