diff --git a/src/index.tsx b/src/index.tsx
index da51b5f..6191690 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -575,11 +575,13 @@ const app = new Elysia({
class="w-full rounded bg-neutral-800 p-4"
/>
-
+
{Object.entries(getAllTargets()).map(
([converter, targets]) => (
-
+
@@ -652,11 +662,13 @@ const app = new Elysia({
({ body }) => {
return (
<>
-
+
{Object.entries(getPossibleTargets(body.fileType)).map(
([converter, targets]) => (
Results
-
+
Time |
@@ -1036,11 +1049,13 @@ const app = new Elysia({
[&[value]::-webkit-progress-value]:transition-[inline-size]
`}
/>
-
+
Converted File Name |
@@ -1156,11 +1171,13 @@ const app = new Elysia({
[&[value]::-webkit-progress-value]:transition-[inline-size]
`}
/>
-
+
Converted File Name |
@@ -1250,12 +1267,14 @@ const app = new Elysia({
Converters
-
+
Converter |
diff --git a/src/public/script.js b/src/public/script.js
index b513b0c..2f65439 100644
--- a/src/public/script.js
+++ b/src/public/script.js
@@ -22,6 +22,7 @@ const updateSearchBar = () => {
const convertToGroupElements = document.querySelectorAll(".convert_to_group");
const convertToGroups = {};
const convertToElement = document.querySelector("select[name='convert_to']");
+ const convertButton = document.querySelector("input[type='submit']");
const showMatching = (search) => {
for (const [targets, groupElement] of Object.values(convertToGroups)) {
@@ -57,6 +58,7 @@ const updateSearchBar = () => {
target.onmousedown = () => {
convertToElement.value = target.dataset.value;
convertToInput.value = `${target.dataset.target} using ${target.dataset.converter}`;
+ convertButton.disabled = false;
showMatching("");
};
}
@@ -68,6 +70,11 @@ const updateSearchBar = () => {
showMatching(e.target.value.toLowerCase());
});
+ convertToInput.addEventListener("search", () => {
+ // when the user clears the search bar using the 'x' button
+ convertButton.disabled = true;
+ });
+
convertToInput.addEventListener("blur", (e) => {
// Keep the popup open even when clicking on a target button
// for a split second to allow the click to go through