Skip to content

Commit

Permalink
se
Browse files Browse the repository at this point in the history
  • Loading branch information
Nintendoboi22 authored Oct 15, 2024
1 parent 629032d commit 2272e09
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@
</head>
<center>
<h3 class="title"><Font COLOR="#ffffff">
Panic Button, press <kbd>Q</kbd> key</h3>
Panic Button, press <kbd>Q</kbd> key</h3></center>

<label>
<input type="checkbox" id="toggleNewTabWhenLinkPressed" style="margin-right: 5px;">
Links Open New Tab
</label>

<center>
<i>
<br><button onclick="while(true) {}">Click Me If U Dare😈</button><!--<button onclick="resetTime">Reset Time</button>-->

Expand Down
14 changes: 14 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
const toggleNewTabWhenLinkPressed = document.getElementById("toggleNewTabWhenLinkPressed");

function updateLinks (toggleNewTabWhenLinkPressed) {
const links = document.querySelectorAll("a");
links.forEach((link)) => {
if (toggleNewTabWhenLinkPressed) {
link.removeAttribute("target");
} else {
link.setAttribute("target", "_blank");
}
}
}


const searchInput = document.getElementById('search-input');

searchInput.addEventListener('input', () => {
Expand Down

0 comments on commit 2272e09

Please sign in to comment.