Skip to content

Commit

Permalink
consistently use noopener with cross-origin links
Browse files Browse the repository at this point in the history
  • Loading branch information
willnorris committed Oct 22, 2021
1 parent 60118f0 commit 44e7936
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion content/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1 class="small-title mega-margin">Explore Projects</h1>
<div class="container">
<div class="center-text" id="open-source-text">
<h1 class="small-title mega-margin open-source-title">Follow Us <a target="_blank"
href="https://twitter.com/TwitterOSS">@TwitterOSS</a></h1>
rel="noopener" href="https://twitter.com/TwitterOSS">@TwitterOSS</a></h1>
</div>
<div id="open-source-timeline" class="timeline-cell">
<a class="twitter-timeline" data-height="450px" href="https://twitter.com/TwitterOSS?ref_src=twsrc%5Etfw">Tweets by TwitterOSS</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/memberships.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>{{ .name }}</h2>

<!-- Twitter handle -->
{{ with .twitter }}
<a href="https://twitter.com/{{ . }}" target="_blank" class="membership-handle">
<a href="https://twitter.com/{{ . }}" target="_blank" rel="noopener" class="membership-handle">
@{{ . }}
</a>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "header" }}
<h1 class="subtitle">
<a href="https://twitter.com/TwitterOSS" target="_blank">@TwitterOSS</a>
<a href="https://twitter.com/TwitterOSS" target="_blank" rel="noopener">@TwitterOSS</a>
</h1>
<h1 class="large-title">Open Source is Happening</h1>
{{ end }}
Expand Down
28 changes: 14 additions & 14 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@
</div>
<div class="footer-cell footer-margin">
<h3 class="xsmall-margin">
<a class="foot-link" target="_blank" href="https://about.twitter.com/">About</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://about.twitter.com/">About</a>
</h3>
<a class="foot-link" target="_blank" href="https://about.twitter.com/en/who-we-are/twitter-for-good">Twitter for Good</a>
<a class="foot-link" target="_blank" href="https://careers.twitter.com/">Careers</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://about.twitter.com/en/who-we-are/twitter-for-good">Twitter for Good</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://careers.twitter.com/">Careers</a>
</div>

<div class="footer-cell footer-margin">
<h3 class="xsmall-margin">
<a class="foot-link" target="_blank" href="https://blog.twitter.com/">Blogs</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://blog.twitter.com/">Blogs</a>
</h3>
<a class="foot-link" target="_blank" href="https://blog.twitter.com/engineering/en_us/topics/open-source.html">Open Source</a>
<a class="foot-link" target="_blank" href="https://blog.twitter.com/engineering">Engineering</a>
<a class="foot-link" target="_blank" href="https://blog.twitter.com/developer">Developer</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://blog.twitter.com/engineering/en_us/topics/open-source.html">Open Source</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://blog.twitter.com/engineering">Engineering</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://blog.twitter.com/developer">Developer</a>
</div>

<div class="footer-cell footer-margin">
<h3 class="xsmall-margin">
<a class="foot-link" target="_blank" href="https://developer.twitter.com/">Developers</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://developer.twitter.com/">Developers</a>
</h3>
<a class="foot-link" target="_blank" href="https://developer.twitter.com/docs">Documentation</a>
<a class="foot-link" target="_blank" href="https://twittercommunity.com/">Forums</a>
<a class="foot-link" target="_blank" href="https://developer.twitter.com/community">Communities</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://developer.twitter.com/docs">Documentation</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://twittercommunity.com/">Forums</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://developer.twitter.com/community">Communities</a>
</div>

<div class="footer-cell">
© {{ now.Format "2006"}} Twitter, Inc.
</div>

<div class="footer-cell">
<a class="foot-link" target="_blank" href="https://help.twitter.com/rules-and-policies/twitter-cookies">Cookies</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://help.twitter.com/rules-and-policies/twitter-cookies">Cookies</a>
</div>

<div class="footer-cell">
<a class="foot-link" target="_blank" href="https://twitter.com/privacy">Privacy</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://twitter.com/privacy">Privacy</a>
</div>

<div class="footer-cell">
<a class="foot-link" target="_blank" href="https://twitter.com/tos">Terms and Conditions</a>
<a class="foot-link" target="_blank" rel="noopener" href="https://twitter.com/tos">Terms and Conditions</a>
</div>
</div>
</div> <!-- End of Footer -->
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</li>

<li class="nav-list-item">
<a class="nav-link" href="https://blog.twitter.com/engineering/en_us/topics/open-source.html" target="_blank">Blog</a>
<a class="nav-link" href="https://blog.twitter.com/engineering/en_us/topics/open-source.html" target="_blank" rel="noopener">Blog</a>
</li>

<li class="nav-list-item list-end">
<a class="nav-link" href="https://github.com/twitter" target="_blank">GitHub</a>
<a class="nav-link" href="https://github.com/twitter" target="_blank" rel="noopener">GitHub</a>
</li>
</ul>
</nav>
Expand Down
2 changes: 2 additions & 0 deletions static/js/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var renderProjects = function(projectsList, searchString="") {
githubLink.href = getGithubURL(project)
githubLink.innerHTML = "GitHub"
githubLink.target = "_blank"
githubLink.rel = "noopener"
projectLinksDiv.appendChild(githubLink)

// Website link (with clause)
Expand All @@ -83,6 +84,7 @@ var renderProjects = function(projectsList, searchString="") {
websiteLink.href = homepageURL
websiteLink.innerHTML = "Website"
websiteLink.target = "_blank"
websiteLink.rel = "noopener"
projectLinksDiv.appendChild(websiteLink)
}

Expand Down
1 change: 1 addition & 0 deletions static/js/year-in-review.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function renderTopRepos(reposList) {
repoLink.innerHTML = repo.name;
repoLink.href = "https://github.com/twitter/" + repo.name;
repoLink.target = "_blank";
repoLink.rel = "noopener";

repoData.appendChild(repoLink);
row.appendChild(repoData);
Expand Down

0 comments on commit 44e7936

Please sign in to comment.