Skip to content

Commit 8af57ac

Browse files
committed
chore: ensure all external links open in a new tab
1 parent 94bfed0 commit 8af57ac

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

assets/js/config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ function applySocialLinks(config) {
2222
const socialType = link.getAttribute('data-social');
2323
if (config.social[socialType]) {
2424
link.href = config.social[socialType];
25+
link.target = "_blank";
26+
link.rel = "noopener noreferrer";
2527
}
2628
});
2729
}
@@ -37,6 +39,8 @@ function applyProjectLinks(config) {
3739

3840
if (config.projects[projectName] && config.projects[projectName][linkType]) {
3941
link.href = config.projects[projectName][linkType];
42+
link.target = "_blank";
43+
link.rel = "noopener noreferrer";
4044
}
4145
});
4246
}
@@ -50,6 +54,8 @@ function applyToolLinks(config) {
5054
const toolName = link.getAttribute('data-tool');
5155
if (config.tools[toolName]) {
5256
link.href = config.tools[toolName];
57+
link.target = "_blank";
58+
link.rel = "noopener noreferrer";
5359
}
5460
});
5561
}
@@ -63,6 +69,8 @@ function applyNotionLinks(config) {
6369
const noteType = link.getAttribute('data-notion-note');
6470
if (config.notionNotes[noteType]) {
6571
link.href = config.notionNotes[noteType];
72+
link.target = "_blank";
73+
link.rel = "noopener noreferrer";
6674
}
6775
});
6876
}

project.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
<div class="order-1 flex justify-center items-center">
129129
<div class="box h-[70px] md:h-[90px] lg:h-[150px] w-fit md:w-2/3 mb-4 lg:mb-0">
130130
<div class="content fonty text-[20px] lg:text-[32px] tracking-wider px-10 lg:px-5 mt-2 text-center">
131-
mcp-phabricator
131+
mcp phabricator
132132
</div>
133133
<div class="corner top-left"></div>
134134
<div class="corner top-right"></div>
@@ -227,10 +227,10 @@
227227
</p>
228228
</div>
229229
<div class="row-span-1 flex justify-around w-full">
230-
<a href="https://github.com/bogusdeck/rashtriyatv-news">
230+
<a href="https://github.com/bogusdeck/rashtriyatv-news" target="_blank" rel="noopener noreferrer">
231231
<img src="assets/images/logo/github.png" alt="githublogo" class="w-10" />
232232
</a>
233-
<a href="https://www.rashtriyatv.com/">
233+
<a href="https://www.rashtriyatv.com/" target="_blank" rel="noopener noreferrer">
234234
<img src="assets/images/logo/linkredirect.gif" alt="linkredirect" class="w-10" />
235235
</a>
236236
</div>
@@ -301,10 +301,10 @@
301301
</p>
302302
</div>
303303
<div class="row-span-1 flex justify-around w-full">
304-
<a href="https://github.com/bogusdeck/Text-Review-authenticity-checker">
304+
<a href="https://github.com/bogusdeck/Text-Review-authenticity-checker" target="_blank" rel="noopener noreferrer">
305305
<img src="assets/images/logo/github.png" alt="githublogo" class="w-10" />
306306
</a>
307-
<a href="https://reviewreward-production.up.railway.app/">
307+
<a href="https://reviewreward-production.up.railway.app/" target="_blank" rel="noopener noreferrer">
308308
<img src="assets/images/logo/linkredirect.gif" alt="linkredirect" class="w-10" />
309309
</a>
310310
</div>
@@ -337,10 +337,10 @@
337337
</p>
338338
</div>
339339
<div class="row-span-1 flex justify-around w-full">
340-
<a href="https://github.com/bogusdeck/Discord-welcome-bot">
340+
<a href="https://github.com/bogusdeck/Discord-welcome-bot" target="_blank" rel="noopener noreferrer">
341341
<img src="assets/images/logo/github.png" alt="githublogo" class="w-10" />
342342
</a>
343-
<a href="https://discord.gg/7GBTuQmXAX">
343+
<a href="https://discord.gg/7GBTuQmXAX" target="_blank" rel="noopener noreferrer">
344344
<img src="assets/images/logo/linkredirect.gif" alt="linkredirect" class="w-10" />
345345
</a>
346346
</div>
@@ -401,4 +401,4 @@
401401
<script src="assets/js/project.js"></script>
402402
</body>
403403

404-
</html>
404+
</html>

0 commit comments

Comments
 (0)