MCPcopy
hub / github.com/opentrace/opentrace / isServerMode

Function isServerMode

ui/src/main.tsx:29–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27// that case. Detection mirrors `OpenTraceApp.detectInitialMode()` —
28// invalid URLs fall through to the standard COI check.
29function isServerMode(): boolean {
30 try {
31 const serverUrl = new URLSearchParams(window.location.search).get('server');
32 if (!serverUrl) return false;
33 new URL(serverUrl);
34 return true;
35 } catch {
36 return false;
37 }
38}
39
40if (!isServerMode() && !window.crossOriginIsolated) {
41 root.innerHTML =

Callers 1

main.tsxFile · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected