(highlight = true)
| 1013 | } |
| 1014 | } |
| 1015 | function areTab1InputsValid(highlight = true) { |
| 1016 | let isValid = true; |
| 1017 | const elementsToHighlight = []; |
| 1018 | const targetValue = UI.targetTab1?.value.trim(); |
| 1019 | const engineValue = UI.searchengineSelect?.value; |
| 1020 | const listValue = UI.listTab1?.value; |
| 1021 | if (!targetValue) { |
| 1022 | isValid = false; |
| 1023 | if (UI.targetTab1) elementsToHighlight.push(UI.targetTab1); |
| 1024 | } |
| 1025 | if (engineValue === "0") { |
| 1026 | isValid = false; |
| 1027 | if (UI.searchengineSelect) |
| 1028 | elementsToHighlight.push(UI.searchengineSelect); |
| 1029 | } |
| 1030 | if (listValue === "0") { |
| 1031 | isValid = false; |
| 1032 | if (UI.listTab1) elementsToHighlight.push(UI.listTab1); |
| 1033 | } |
| 1034 | if (!isValid && highlight) { |
| 1035 | showModal("Please fill Target, select Engine and Dork List."); |
| 1036 | highlightInvalidTab1Inputs(elementsToHighlight); |
| 1037 | } else if (highlight) { |
| 1038 | hideErrorTab1(); |
| 1039 | } |
| 1040 | return isValid; |
| 1041 | } |
| 1042 | |
| 1043 | function getSelectedOptionLabel(selectElement) { |
| 1044 | if (!selectElement || selectElement.value === "0") return ""; |
no test coverage detected