feat: update dependencies, enhance upload rate limiting, and improve UI elements

This commit is contained in:
2026-01-16 08:54:14 +01:00
parent 7a01525ca5
commit e90c4576a5
9 changed files with 156 additions and 83 deletions

View File

@@ -15,7 +15,7 @@
</head>
<body>
<h1>Black Hole Share</h1>
<h1><a href="/" class="home-link">Black Hole Share</a></h1>
<div class="upload-container">
<div class="upload-area">
@@ -368,6 +368,26 @@
}
});
function canTriggerUpload() {
return (
currentContentData &&
window.getComputedStyle(uploadBtn).display !== "none" &&
zoomOverlay.style.display !== "flex"
);
}
// ENTER TO UPLOAD (when content is ready)
document.addEventListener(
"keydown",
function (e) {
if ((e.key === "Enter" || e.code === "NumpadEnter") && canTriggerUpload()) {
e.preventDefault();
uploadBtn.click();
}
},
true
);
window.addEventListener("resize", function () {
if (currentContentData) {
displayContent(currentContentData);
@@ -376,4 +396,4 @@
</script>
</body>
</html>
</html>