mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
noreferrer everywhere
This commit is contained in:
committed by
Aiden McClelland
parent
3877e43b84
commit
9c6aaa64b8
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user