We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5032b08 commit 2168768Copy full SHA for 2168768
javascripts/discourse/initializers/initialize-for-header-icon-links.js
@@ -17,6 +17,7 @@ export default {
17
const className = `header-icon-${dasherize(fragments[0])}`;
18
const viewClass = fragments[3].toLowerCase();
19
const target = fragments[4].toLowerCase() === "blank" ? "_blank" : "";
20
+ const rel = target ? "noopener" : "";
21
const isLastLink =
22
link === links[links.length - 1] ? ".last-custom-icon" : "";
23
const selector = `li.custom-header-icon-link.${className}.${viewClass}${isLastLink}`;
@@ -29,6 +30,9 @@ export default {
29
30
href,
31
title,
32
target,
33
+ attributes: {
34
+ rel,
35
+ },
36
},
37
icon
38
),
0 commit comments