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

Function updateRunStatus

Script/FastDork.js:1056–1091  ·  view source on GitHub ↗
({ count = 0, inputsValid = false, limitExceeded = false } = {})

Source from the content-addressed store, hash-verified

1054 }
1055
1056 function updateRunStatus({ count = 0, inputsValid = false, limitExceeded = false } = {}) {
1057 if (!UI.runStatusDot || !UI.runStatusState || !UI.runStatusDetail) return;
1058
1059 const targetValue = UI.targetTab1?.value.trim();
1060 const engineValue = UI.searchengineSelect?.value;
1061 const listValue = UI.listTab1?.value;
1062 const missing = [];
1063
1064 if (!targetValue) missing.push("target");
1065 if (engineValue === "0") missing.push("engine");
1066 if (listValue === "0") missing.push("dork list");
1067
1068 const isReady = inputsValid && count > 0 && !limitExceeded;
1069 UI.runStatusDot.classList.toggle("status-dot-ready", isReady);
1070 UI.runStatusDot.classList.toggle("status-dot-missing", !isReady);
1071
1072 if (isReady) {
1073 const queryLabel = count === 1 ? "query" : "queries";
1074 const engineLabel = getSelectedOptionLabel(UI.searchengineSelect) || "Engine";
1075 UI.runStatusState.textContent = "Ready";
1076 UI.runStatusDetail.textContent = `${count} ${queryLabel} · ${engineLabel}`;
1077 return;
1078 }
1079
1080 UI.runStatusState.textContent = "Missing";
1081
1082 if (missing.length > 0) {
1083 UI.runStatusDetail.textContent = `Choose ${formatMissingItems(missing)}`;
1084 } else if (limitExceeded) {
1085 UI.runStatusDetail.textContent = `${count}/${CONSTANTS.TAB_LIMIT} queries max`;
1086 } else if (count === 0) {
1087 UI.runStatusDetail.textContent = "Dork list is empty";
1088 } else {
1089 UI.runStatusDetail.textContent = "Check target, engine, and dork list";
1090 }
1091 }
1092
1093 function highlightInvalidTab1Inputs(elements = null) {
1094 const elementsToCheck = Array.isArray(elements)

Callers 1

updateDorkCounterFunction · 0.85

Calls 2

getSelectedOptionLabelFunction · 0.85
formatMissingItemsFunction · 0.85

Tested by

no test coverage detected