Removed the variables at the start of the script.js file

This commit is contained in:
2025-11-12 18:44:27 +01:00
parent 54f1f6c135
commit 0f54edb0aa
+6 -20
View File
@@ -1,22 +1,8 @@
try {
const uploadContainer = document.getElementById('uploadContainer');
const fileInput = document.getElementById('videoUpload');
const fileName = document.getElementById('fileName');
const manualBtn = document.getElementById('manualUploadBtn');
const videoPreview = document.getElementById('videoPreview');
const submitBtn = document.getElementById('submitButton');
const deButton = document.getElementById('de_Btn');
const engButton = document.getElementById('eng_Btn');
const inButton = document.getElementById('in_Btn');
} catch (error) {
console.log("Error in skript value setting section");
}
//listener for the file explorer search //listener for the file explorer search
manualBtn.addEventListener('click', () => { manualUploadBtn.addEventListener('click', () => {
try { try {
fileInput.click(); videoUpload.click();
} catch (error) { } catch (error) {
console.log("Error in manualBtn EventListener click"); console.log("Error in manualBtn EventListener click");
} }
@@ -46,7 +32,7 @@ function checkBoxes() {
alert('Please select at least one document type.'); alert('Please select at least one document type.');
} }
} catch (error) { } catch (error) {
console.log("Error in scrpt.js checkBoxes function"); console.log("Error")
} }
// mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"}) // mapFunctions.get("extraction-video-to-audio").function({inputVideoPath:"./a.mp4", outputType:"wav"})
@@ -89,9 +75,9 @@ function changeLanguage(language) {
//listener for the file explorer search when something got selected //listener for the file explorer search when something got selected
fileInput.addEventListener('change', () => { videoUpload.addEventListener('change', () => {
try { try {
handleFiles(fileInput.files); handleFiles(videoUpload.files);
} catch (error) { } catch (error) {
console.log("Error in manualBtn EventListener change"); console.log("Error in manualBtn EventListener change");
} }
@@ -106,7 +92,7 @@ function handleFiles(files) {
if (files.length > 0) { if (files.length > 0) {
const file = files[0]; const file = files[0];
if (file.type.startsWith('video/')) { if (file.type.startsWith('video/')) {
fileInput.files = files; videoUpload.files = files;
fileName.textContent = `Chosen video: ${file.name}`; fileName.textContent = `Chosen video: ${file.name}`;
} }
} }