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

Function handleProceedDorkOptions

Script/FastDork.js:882–1014  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

880 }
881
882 async function handleProceedDorkOptions() {
883 if (isStartingDorkExecution) {
884 console.warn("[handleProceedDorkOptions] Start already in progress.");
885 return;
886 }
887
888 if (UI.dorkOptionsProceed.disabled) {
889 if (
890 UI.autoImportCheckbox?.checked &&
891 UI.autoImportResultList?.value === "0"
892 ) {
893 highlightInvalidTab1Inputs(UI.autoImportResultList);
894 }
895 return;
896 }
897
898 const targetValue = UI.targetTab1?.value.trim();
899 const listKey = UI.listTab1?.value;
900 const mode = parseInt(UI.selectModTab1?.value || "0");
901 const engineKey = UI.searchengineSelect?.value;
902 const delay = parseInt(UI.delaySelect?.value || "0");
903 const autoImport = UI.autoImportCheckbox?.checked || false;
904 const resultListKey = UI.autoImportResultList?.value; // Still need the value
905
906 // Basic Tab 1 validation still needed here
907 if (!areTab1InputsValid(true)) {
908 // This function already shows a modal and highlights
909 return;
910 }
911
912 if (
913 mode === 1 &&
914 !targetValue.includes("$target") &&
915 !targetValue.includes("$t")
916 ) {
917 showModal(
918 "One Dork mode requires $target or $t in the Target/Dork input.",
919 [],
920 UI.dorkOptionsModal // Show error in the correct modal
921 );
922 highlightInvalidTab1Inputs(UI.targetTab1);
923 return;
924 }
925
926 const listCount = parseInt(UI.nbrCounter?.textContent || "0");
927 if (listCount <= 0) {
928 showModal(
929 "Cannot start: Selected Dork List is empty.",
930 [],
931 UI.dorkOptionsModal // Show error in the correct modal
932 );
933 highlightInvalidTab1Inputs(UI.listTab1);
934 return;
935 }
936 if (listCount > CONSTANTS.TAB_LIMIT) {
937 showModal(
938 `Cannot start: Too many tabs requested (${listCount}/${CONSTANTS.TAB_LIMIT} max).`,
939 [],

Callers

nothing calls this directly

Calls 6

areTab1InputsValidFunction · 0.85
showModalFunction · 0.85
setDorkExecutionStartingFunction · 0.85
hideDorkOptionsModalFunction · 0.85
showSuccessAnimationFunction · 0.85

Tested by

no test coverage detected