mirror of
https://github.com/milk-net/milk-net.github.io.git
synced 2025-04-19 17:43:42 -05:00
Update index.html
This commit is contained in:
parent
ede210af7f
commit
0bea9f6f6d
1 changed files with 18 additions and 0 deletions
|
@ -14,6 +14,24 @@
|
|||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let savedLink = localStorage.getItem("savedLink");
|
||||
|
||||
document.addEventListener("keydown", function(event) {
|
||||
if (event.key === ",") {
|
||||
if (!savedLink) {
|
||||
savedLink = prompt("Escape to: https://YOURLINK.tld");
|
||||
if (savedLink) {
|
||||
localStorage.setItem("savedLink", savedLink);
|
||||
}
|
||||
} else {
|
||||
window.open(savedLink, "_blank");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<img src="/assets/img/milk_optimized.png" class="center">
|
||||
|
|
Loading…
Add table
Reference in a new issue