MCPcopy Create free account
hub / github.com/SKVNDR/FastDork / areTab1InputsValid

Function areTab1InputsValid

Script/FastDork.js:1015–1041  ·  view source on GitHub ↗
(highlight = true)

Source from the content-addressed store, hash-verified

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 "";

Callers 3

handleGoButtonClickFunction · 0.85
handleProceedDorkOptionsFunction · 0.85
updateDorkCounterFunction · 0.85

Calls 3

showModalFunction · 0.85
hideErrorTab1Function · 0.85

Tested by

no test coverage detected