fix: Remove browser dependencies for Node.js data fetching

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-04-01 12:29:07 -06:00
parent 600326c8bf
commit 965e9150d0
2 changed files with 11 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ extends Base
let urlWsprLive = urlWsprLiveMaker.href + " FORMAT JSONCompact";
// make debug url
let urlQueryTableMaker = new URL(`/pro/query/`, window.location);
let urlQueryTableMaker = new URL(`/pro/query/`, "http://localhost"); // dummy base
urlQueryTableMaker.searchParams.set("query", query);
let urlQueryTable = urlQueryTableMaker.href;

View File

@@ -102,6 +102,7 @@ export function Commas(num)
return `${num}`;
}
/*
// take in any css color string (hex, rgb, name, etc)
// return array [r, g, b]
export function GetRgbFromColor(color)
@@ -125,6 +126,7 @@ export function GetRgbFromColor(color)
return rgbArr;
}
*/
@@ -152,6 +154,7 @@ export function PctBetween(pct, num1, num2)
}
/*
// returns a string of "rgb(r, g, b)"
export function ColorPctBetween(pct, colorStart, colorEnd, toInt = false)
{
@@ -173,6 +176,7 @@ export function ColorPctBetween(pct, colorStart, colorEnd, toInt = false)
return retVal;
}
*/
export function Now()
@@ -596,6 +600,7 @@ export function ListIntersectionUnique(leftList, rightList)
}
/*
export function GetSearchParam(paramName, defaultValue)
{
let retVal = defaultValue;
@@ -891,12 +896,14 @@ export function MakeTableTransposed(dataTable)
return table;
}
*/
export function SleepAsync(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
/*
export function CopyElementToClipboard(id)
{
let dom = document.getElementById(id);
@@ -989,6 +996,7 @@ export function DownloadKml(filename, data)
Download(filename, format, data);
}
*/
export function MakeLink(url, label)
{
@@ -1075,6 +1083,7 @@ export function StructuredOverlay(obj, vals)
/*
// thanks chatgpt
export async function SaveToFile(text, suggestedName) {
const blob = new Blob([text], { type: 'text/plain' });
@@ -1346,3 +1355,4 @@ class DomHotkeyHandler {
this.dom.setSelectionRange(cursorIdx, cursorIdx);
}
}
*/