diff --git a/src/main/resources/static/css/dark-mode.css b/src/main/resources/static/css/dark-mode.css index 8ddbf052..b874f410 100644 --- a/src/main/resources/static/css/dark-mode.css +++ b/src/main/resources/static/css/dark-mode.css @@ -114,28 +114,28 @@ hr { border-color: #fff; } -#global-buttons-container input { +.global-buttons-container input { background-color: #323948; caret-color: #ffffff; color: #ffffff; } -#global-buttons-container input::placeholder { +.global-buttons-container input::placeholder { color: #ffffff; } -#global-buttons-container input:disabled::-webkit-input-placeholder { +.global-buttons-container input:disabled::-webkit-input-placeholder { /* WebKit browsers */ color: #6e6865; } -#global-buttons-container input:disabled:-moz-placeholder { +.global-buttons-container input:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #6e6865; } -#global-buttons-container input:disabled::-moz-placeholder { +.global-buttons-container input:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #6e6865; } -#global-buttons-container input:disabled:-ms-input-placeholder { +.global-buttons-container input:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */ color: #6e6865; } diff --git a/src/main/resources/static/css/dragdrop.css b/src/main/resources/static/css/dragdrop.css index 14c3befe..7758bdd9 100644 --- a/src/main/resources/static/css/dragdrop.css +++ b/src/main/resources/static/css/dragdrop.css @@ -36,11 +36,11 @@ visibility: hidden !important; } -html[lang-direction="ltr"] .drag-manager_draghover img { +html[dir="ltr"] .drag-manager_draghover img { left: calc(50% + 62.5px) !important; } -html[lang-direction="rtl"] .drag-manager_draghover img { +html[dir="rtl"] .drag-manager_draghover img { left: 125px; } diff --git a/src/main/resources/static/css/error.css b/src/main/resources/static/css/error.css index 0477d7e0..5cc37b61 100644 --- a/src/main/resources/static/css/error.css +++ b/src/main/resources/static/css/error.css @@ -68,11 +68,11 @@ p { #github-button:hover, #discord-button:hover, -#home-button:hover { +.home-button:hover { background-color: #005b7f; } -#home-button { +.home-button { display: block; width: 200px; height: 50px; diff --git a/src/main/resources/static/css/errorBanner.css b/src/main/resources/static/css/errorBanner.css index 11b111ab..75618731 100644 --- a/src/main/resources/static/css/errorBanner.css +++ b/src/main/resources/static/css/errorBanner.css @@ -77,11 +77,11 @@ #github-button:hover, #discord-button:hover, -#home-button:hover { +.home-button:hover { background-color: #005b7f; } -#home-button { +.home-button { display: block; width: 200px; height: 50px; diff --git a/src/main/resources/static/css/general.css b/src/main/resources/static/css/general.css index 8d631bfd..72edf184 100644 --- a/src/main/resources/static/css/general.css +++ b/src/main/resources/static/css/general.css @@ -25,10 +25,10 @@ margin-right: auto; }*/ -html[lang-direction="ltr"] * { +html[dir="ltr"] * { direction: ltr; } -html[lang-direction="rtl"] * { +html[dir="rtl"] * { direction: rtl; text-align: right; } @@ -63,11 +63,11 @@ html[lang-direction="rtl"] * { border-bottom-left-radius: 0.25rem !important; } -html[lang-direction="rtl"] input.form-check-input { +html[dir="rtl"] input.form-check-input { position: relative; margin-left: 0px; } -html[lang-direction="rtl"] label.form-check-label { +html[dir="rtl"] label.form-check-label { display: inline; } diff --git a/src/main/resources/static/css/light-mode.css b/src/main/resources/static/css/light-mode.css index af84b0d5..f7e79b90 100644 --- a/src/main/resources/static/css/light-mode.css +++ b/src/main/resources/static/css/light-mode.css @@ -4,20 +4,20 @@ body { --base-font-color: 33, 37, 41; } -#global-buttons-container input { +.global-buttons-container input { background-color: #ffffff; /*caret-color: #ffffff;*/ /*color: #ffffff;*/ } -/*#global-buttons-container input:disabled::-webkit-input-placeholder { !* WebKit browsers *!*/ +/*.global-buttons-container input:disabled::-webkit-input-placeholder { !* WebKit browsers *!*/ /* color: #98A0AB;*/ /*}*/ -/*#global-buttons-container input:disabled:-moz-placeholder { !* Mozilla Firefox 4 to 18 *!*/ +/*.global-buttons-container input:disabled:-moz-placeholder { !* Mozilla Firefox 4 to 18 *!*/ /* color: #98A0AB;*/ /*}*/ -/*#global-buttons-container input:disabled::-moz-placeholder { !* Mozilla Firefox 19+ *!*/ +/*.global-buttons-container input:disabled::-moz-placeholder { !* Mozilla Firefox 19+ *!*/ /* color: #98A0AB;*/ /*}*/ -/*#global-buttons-container input:disabled:-ms-input-placeholder { !* Internet Explorer 10+ *!*/ +/*.global-buttons-container input:disabled:-ms-input-placeholder { !* Internet Explorer 10+ *!*/ /* color: #98A0AB;*/ /*}*/ diff --git a/src/main/resources/static/css/multi-tool.css b/src/main/resources/static/css/multi-tool.css index 9ed84f2b..50e038ce 100644 --- a/src/main/resources/static/css/multi-tool.css +++ b/src/main/resources/static/css/multi-tool.css @@ -3,7 +3,7 @@ margin: 0 auto; } -#global-buttons-container { +.global-buttons-container { display: flex; gap: 10px; align-items: start; @@ -17,11 +17,11 @@ padding: 10px; border-radius: 8px; } -#global-buttons-container > * { +.global-buttons-container > * { padding: 0.6rem 0.75rem; } -#global-buttons-container svg { +.global-buttons-container svg { width: 20px; height: 20px; } diff --git a/src/main/resources/static/css/pdfActions.css b/src/main/resources/static/css/pdfActions.css index ff680036..455de860 100644 --- a/src/main/resources/static/css/pdfActions.css +++ b/src/main/resources/static/css/pdfActions.css @@ -45,11 +45,11 @@ right: -20px; } -html[lang-direction="ltr"] .pdf-actions_insert-file-button-container.right { +html[dir="ltr"] .pdf-actions_insert-file-button-container.right { display: none; } -html[lang-direction="rtl"] .pdf-actions_insert-file-button-container.left { +html[dir="rtl"] .pdf-actions_insert-file-button-container.left { display: none; } @@ -63,11 +63,11 @@ html[lang-direction="rtl"] .pdf-actions_insert-file-button-container.left { translate: 0 -50%; } -html[lang-direction="ltr"] .pdf-actions_container:last-child > .pdf-actions_insert-file-button-container.right { +html[dir="ltr"] .pdf-actions_container:last-child > .pdf-actions_insert-file-button-container.right { display: block; } -html[lang-direction="rtl"] .pdf-actions_container:last-child > .pdf-actions_insert-file-button-container.left { +html[dir="rtl"] .pdf-actions_container:last-child > .pdf-actions_insert-file-button-container.left { display: block; } diff --git a/src/main/resources/static/css/rotate-pdf.css b/src/main/resources/static/css/rotate-pdf.css index 7c5d388d..57a30024 100644 --- a/src/main/resources/static/css/rotate-pdf.css +++ b/src/main/resources/static/css/rotate-pdf.css @@ -11,7 +11,7 @@ translate: -50% -50%; } -.previewContainer { +#previewContainer { aspect-ratio: 1; width: 100%; border: 1px solid rgba(0, 0, 0, 0.125); diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index 4d7fa783..c955bb1b 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -53,8 +53,8 @@ $(document).ready(function () { // Display a green banner at the bottom of the screen saying "Download complete" let downloadCompleteText = "Download Complete"; if(window.downloadCompleteText){ - downloadCompleteText = window.downloadCompleteText; - } + downloadCompleteText = window.downloadCompleteText; + } $("body").append('
'); setTimeout(function() { $("#download-complete-banner").fadeOut("slow", function() { @@ -79,8 +79,8 @@ async function handleSingleDownload(url, formData, isMulti = false, isZip = fals if (!response.ok) { if (contentType && contentType.includes("application/json")) { - return handleJsonResponse(response); console.error("Throwing error banner, response was not okay"); + return handleJsonResponse(response); } throw new Error(`HTTP error! status: ${response.status}`); } @@ -177,10 +177,10 @@ async function submitMultiPdfForm(url, files) { const zipFiles = files.length > zipThreshold; let jszip = null; // Show the progress bar - $("#progressBarContainer").show(); + $(".progressBarContainer").show(); // Initialize the progress bar - let progressBar = $("#progressBar"); + let progressBar = $(".progressBar"); progressBar.css("width", "0%"); progressBar.attr("aria-valuenow", 0); progressBar.attr("aria-valuemax", files.length); diff --git a/src/main/resources/static/js/game.js b/src/main/resources/static/js/game.js index c5162127..3746ef63 100644 --- a/src/main/resources/static/js/game.js +++ b/src/main/resources/static/js/game.js @@ -70,7 +70,7 @@ function initializeGame() { handleKeys(); } function onKeyUp(event) { - keysPressed[event.key] = false; + keysPressed[event.key] = false; } document.removeEventListener("keydown", onKeydown); @@ -123,7 +123,7 @@ function initializeGame() { function updateGame() { if (gameOver || paused) return; - handleKeys(); + handleKeys(); for (let pdfIndex = 0; pdfIndex < pdfs.length; pdfIndex++) { const pdf = pdfs[pdfIndex]; const pdfY = parseFloat(pdf.style.top) + pdfSpeed; diff --git a/src/main/resources/static/js/languageSelection.js b/src/main/resources/static/js/languageSelection.js index ee9ab03b..7af113d0 100644 --- a/src/main/resources/static/js/languageSelection.js +++ b/src/main/resources/static/js/languageSelection.js @@ -26,7 +26,7 @@ document.addEventListener("DOMContentLoaded", function () { }); function setLanguageForDropdown(dropdownClass) { - const defaultLocale = document.documentElement.language || "en_GB"; + const defaultLocale = document.documentElement.getAttribute("data-language") || "en_GB"; const storedLocale = localStorage.getItem("languageCode") || defaultLocale; const dropdownItems = document.querySelectorAll(dropdownClass); diff --git a/src/main/resources/static/js/multitool/DragDropManager.js b/src/main/resources/static/js/multitool/DragDropManager.js index 004412d4..eac92a8c 100644 --- a/src/main/resources/static/js/multitool/DragDropManager.js +++ b/src/main/resources/static/js/multitool/DragDropManager.js @@ -11,7 +11,7 @@ class DragDropManager { constructor(id, wrapperId) { this.dragContainer = document.getElementById(id); - this.pageDirection = document.documentElement.getAttribute("lang-direction"); + this.pageDirection = document.documentElement.getAttribute("dir"); this.wrapper = document.getElementById(wrapperId); this.pageDragging = false; this.hoveredEl = undefined; diff --git a/src/main/resources/static/js/multitool/PdfActionsManager.js b/src/main/resources/static/js/multitool/PdfActionsManager.js index 2fae22d3..163dff3a 100644 --- a/src/main/resources/static/js/multitool/PdfActionsManager.js +++ b/src/main/resources/static/js/multitool/PdfActionsManager.js @@ -4,7 +4,7 @@ class PdfActionsManager { constructor(id) { this.pagesContainer = document.getElementById(id); - this.pageDirection = document.documentElement.getAttribute("lang-direction"); + this.pageDirection = document.documentElement.getAttribute("dir"); var styleElement = document.createElement("link"); styleElement.rel = "stylesheet"; diff --git a/src/main/resources/static/js/pipeline.js b/src/main/resources/static/js/pipeline.js index 9ed3e608..afe1d4d7 100644 --- a/src/main/resources/static/js/pipeline.js +++ b/src/main/resources/static/js/pipeline.js @@ -248,20 +248,20 @@ document.getElementById("addOperationBtn").addEventListener("click", function () } listItem.innerHTML = ` -