fix: key down
All checks were successful
Upload / Explore-Gitea-Actions (push) Successful in 52s

This commit is contained in:
moonlightwatch 2025-03-26 19:41:39 +08:00
parent a0fc627f8a
commit a86fa2da12

View File

@ -43,7 +43,6 @@
}
.relocating {
opacity: 0;
font-size: 13px;
transition: all .3s ease;
}
@ -81,8 +80,8 @@
</div>
</div>
</div>
<div class="relocating">
跳转到: <span class="relocate-location"></span>
<div id="relocating" hidden>
跳转到: <span id="relocate-location"></span>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
@ -93,12 +92,12 @@
var KEY_B = 66;
if (event.which === KEY_B) {
document.getElementsByClassName("relocate-location").text('书签页');
document.getElementsByClassName("relocating").css('opacity', 1);
document.getElementById("relocate-location").innerText = "书签页";
document.getElementById("relocating").hidden = false;
window.setTimeout(function () {
document.getElementsByClassName("relocate-location").text('');
document.getElementsByClassName("relocating").css('opacity', 0);
document.getElementById("relocate-location").innerText = "";
document.getElementById("relocating").hidden = true;
window.location.href = '/bookmarks.html';
}, 1000);
}