MCPcopy
hub / github.com/koala73/worldmonitor / isDesktopRuntime

Function isDesktopRuntime

src/services/runtime.ts:79–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79export function isDesktopRuntime(): boolean {
80 if (FORCE_DESKTOP_RUNTIME) {
81 return true;
82 }
83
84 if (typeof window === 'undefined') {
85 return false;
86 }
87
88 return detectDesktopRuntime({
89 hasTauriGlobals: '__TAURI_INTERNALS__' in window || '__TAURI__' in window,
90 userAgent: window.navigator?.userAgent ?? '',
91 locationProtocol: window.location?.protocol ?? '',
92 locationHost: window.location?.host ?? '',
93 locationOrigin: window.location?.origin ?? '',
94 });
95}
96
97export function getApiBaseUrl(): string {
98 if (!isDesktopRuntime()) {

Callers 15

initSettingsWindowFunction · 0.90
initLiveChannelsWindowFunction · 0.90
initOverviewListenersFunction · 0.90
constructorMethod · 0.90
initMethod · 0.90
constructorMethod · 0.90
renderMethod · 0.90
renderFeatureMethod · 0.90
renderSecretRowMethod · 0.90
attachListenersMethod · 0.90
buildEventMethod · 0.90

Calls 1

detectDesktopRuntimeFunction · 0.85

Tested by

no test coverage detected