website: add rel="noopener" to external links

This commit is contained in:
Yangshun
2022-02-02 07:12:30 +08:00
parent 075f2d28c9
commit 8bb7175524
2 changed files with 12 additions and 7 deletions

View File

@ -1,6 +1,6 @@
--- ---
id: algorithms-introduction id: algorithms-introduction
title: Introduction title: Introduction to algorithms
slug: introduction slug: introduction
--- ---

View File

@ -87,7 +87,7 @@ function Tweet({url, handle, name, content, avatar, date}) {
<strong>{name}</strong>{' '} <strong>{name}</strong>{' '}
<span className={styles.tweetMeta}> <span className={styles.tweetMeta}>
@{handle} &middot;{' '} @{handle} &middot;{' '}
<a className={styles.tweetMeta} href={url}> <a className={styles.tweetMeta} href={url} rel="noopener">
{date} {date}
</a> </a>
</span> </span>
@ -134,7 +134,7 @@ function HeroSection() {
<p className="hero__subtitle"> <p className="hero__subtitle">
{siteConfig.tagline} <br /> {siteConfig.tagline} <br />
Brought to you by FAANG engineers and the author of the{' '} Brought to you by FAANG engineers and the author of the{' '}
<a href={BLIND_75_URL} target="_blank"> <a href={BLIND_75_URL} rel="noopener" target="_blank">
Blind 75 list Blind 75 list
</a> </a>
</p> </p>
@ -183,7 +183,7 @@ function MoonchaserSection() {
<a <a
className="button button--secondary button--lg" className="button button--secondary button--lg"
href="https://www.moonchaser.io/?utm_source=techinterviewhandbook&utm_medium=referral&utm_content=website_homepage" href="https://www.moonchaser.io/?utm_source=techinterviewhandbook&utm_medium=referral&utm_content=website_homepage"
rel="noreferrer noopener" rel="noopener"
target="_blank" target="_blank"
onClick={() => { onClick={() => {
window.gtag('event', 'moonchaser.homepage.click'); window.gtag('event', 'moonchaser.homepage.click');
@ -267,7 +267,9 @@ function ProductContentsSection() {
</a> </a>
</li> </li>
<li> <li>
<a href="https://frontendinterviewhandbook.com"> <a
href="https://frontendinterviewhandbook.com"
rel="noopener">
Front end Front end
</a> </a>
</li> </li>
@ -371,7 +373,7 @@ function EducativeSection() {
<a <a
className="button button--secondary button--lg" className="button button--secondary button--lg"
href="https://www.educative.io/explore?search_string=interview&aff=x23W" href="https://www.educative.io/explore?search_string=interview&aff=x23W"
rel="noreferrer noopener" rel="noopener"
target="_blank" target="_blank"
onClick={() => { onClick={() => {
window.gtag('event', 'educative.homepage.click'); window.gtag('event', 'educative.homepage.click');
@ -582,6 +584,7 @@ function SuccessStoriesSection() {
Would you like to contribute a success story?{' '} Would you like to contribute a success story?{' '}
<a <a
href="https://github.com/yangshun/tech-interview-handbook/edit/master/website/src/data/successStories.js" href="https://github.com/yangshun/tech-interview-handbook/edit/master/website/src/data/successStories.js"
rel="noopener"
target="_blank"> target="_blank">
Open a Pull Request here Open a Pull Request here
</a> </a>
@ -610,6 +613,7 @@ function SponsorshipSection() {
<div> <div>
<a <a
href="https://opencollective.com/tech-interview-handbook/sponsor/0/website" href="https://opencollective.com/tech-interview-handbook/sponsor/0/website"
rel="noopener"
target="_blank"> target="_blank">
<img <img
alt="Sponsor" alt="Sponsor"
@ -618,6 +622,7 @@ function SponsorshipSection() {
</a> </a>
<a <a
href="https://opencollective.com/tech-interview-handbook/sponsor/1/website" href="https://opencollective.com/tech-interview-handbook/sponsor/1/website"
rel="noopener"
target="_blank"> target="_blank">
<img <img
alt="Sponsor" alt="Sponsor"
@ -629,7 +634,7 @@ function SponsorshipSection() {
<a <a
className="button button--secondary button--lg" className="button button--secondary button--lg"
href="https://opencollective.com/tech-interview-handbook" href="https://opencollective.com/tech-interview-handbook"
rel="noreferrer noopener" rel="noopener"
target="_blank"> target="_blank">
Become a sponsor! Become a sponsor!
</a> </a>