Skip to content

Commit

Permalink
add functionality to panic system
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNotSus committed Apr 13, 2024
1 parent 9c8c9fc commit 8c19554
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
11 changes: 11 additions & 0 deletions static/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,14 @@ fetch("/assets/static/ads.json")
console.log("Skipping Adsense Injection for this domain.");
}
});

// key
var panicKey = localStorage.getItem("panicKey") || "`";
var panicLink =
localStorage.getItem("PanicLink") || "https://canvas.houstonisd.org/";

document.addEventListener("keydown", function (e) {
if (e.key === panicKey) {
window.location.href = panicLink;
}
});
19 changes: 19 additions & 0 deletions static/assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,22 @@ function resetTab() {
document.getElementById("icon").value = "";
localStorage.setItem("tab", JSON.stringify({}));
}

var panicKey = localStorage.getItem("panicKey") || "`";
var panicLink =
localStorage.getItem("PanicLink") || "https://canvas.houstonisd.org/";

document.addEventListener("DOMContentLoaded", function () {
document.getElementById("key").value = panicKey;
document.getElementById("link").value = panicLink;
});

function setPanicKey() {
var key = document.getElementById("key").value;
localStorage.setItem("panicKey", key);
}

function setPanicLink() {
var link = document.getElementById("link").value;
localStorage.setItem("PanicLink", link);
}
10 changes: 10 additions & 0 deletions static/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ <h4><b>Panic System</b></h4>
</form>
</div>
</div>
<div class="card">
<div class="container">
<div class="title">
<h4><b>Site Info</b></h4>
</div>
<h3>Version: 2.1.0</h3>
<h3>Join the discord for more unblocked links and support!</h3>
<a href="https://discord.gg/vV7mkcPhMy">https://discord.gg/vV7mkcPhMy</a>
</div>
</div>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6700774525685317"
crossorigin="anonymous"></script>
<!-- games -->
Expand Down

0 comments on commit 8c19554

Please sign in to comment.