Skip to content

Commit 8543e55

Browse files
CopilotMrAlders0n
andcommitted
Add JSDoc documentation for helper function
Document applyCountdownStatus parameters and clarify skipReason is an internal value for security review Co-authored-by: MrAlders0n <55921894+MrAlders0n@users.noreply.github.com>
1 parent d65741a commit 8543e55

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

content/wardrive.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const state = {
9090
nextAutoPingTime: null, // Timestamp when next auto-ping will occur
9191
apiCountdownTimer: null, // Timer for API post countdown display
9292
apiPostTime: null, // Timestamp when API post will occur
93-
skipReason: null // Reason for skipping a ping (e.g., "gps too old")
93+
skipReason: null // Reason for skipping a ping - internal value only (e.g., "gps too old")
9494
};
9595

9696
// ---- UI helpers ----
@@ -108,7 +108,11 @@ function setStatus(text, color = STATUS_COLORS.idle) {
108108
statusEl.className = `font-semibold ${color}`;
109109
}
110110

111-
// Helper function to apply status from countdown result
111+
/**
112+
* Apply status message from countdown timer result
113+
* @param {string|{message: string, color: string}|null} result - Status message (string) or object with message and optional color
114+
* @param {string} defaultColor - Default color to use if result is a string or object without color
115+
*/
112116
function applyCountdownStatus(result, defaultColor) {
113117
if (!result) return;
114118
if (typeof result === 'string') {

0 commit comments

Comments
 (0)