feat: update dependencies, enhance upload rate limiting, and improve UI elements
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user