Skip to content

Commit

Permalink
Act on press
Browse files Browse the repository at this point in the history
  • Loading branch information
alex391 committed May 24, 2024
1 parent 1f9bf25 commit a0dfb38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ <h1>Alex Leute</h1>
<a href="https://github.com/alex391">Github</a>
<a href="https://www.linkedin.com/in/alex-leute/">LinkedIn</a>
</nav>
<script src="index.js"></script>
</body>

</html>
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use strict";
// Act on press
const links = document.querySelectorAll("a");
for (const link of links) {
link.addEventListener("mousedown", () => {
window.location = link.href;
});
}
1 change: 1 addition & 0 deletions projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ <h1>Projects</h1>
<a href="https://github.com/spack/spack/commits/develop/?author=alex391">Spack</a>
<a href="https://github.com/alex391/badventofcode">Advent of Code</a>
</nav>
<script src="index.js"></script>
</body>

</html>

0 comments on commit a0dfb38

Please sign in to comment.