@gringow/gringow-shadow 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gringow-store.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/gringow-store.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var GringowStoreSingleton = class _GringowStoreSingleton {
|
|
|
11
11
|
return _GringowStoreSingleton.instance;
|
|
12
12
|
}
|
|
13
13
|
get cacheUrl() {
|
|
14
|
-
return this.#cacheUrl ?? document
|
|
14
|
+
return this.#cacheUrl ?? globalThis?.document?.head?.querySelector('meta[name="gringow-cache-url"]')?.getAttribute("content") ?? globalThis?.document?.documentElement?.getAttribute("data-gringow-cache-url");
|
|
15
15
|
}
|
|
16
16
|
set cacheUrl(value) {
|
|
17
17
|
if (typeof value !== "string" || value.trim().length <= 0) return;
|
|
@@ -28,7 +28,7 @@ var GringowStoreSingleton = class _GringowStoreSingleton {
|
|
|
28
28
|
this.#language = value;
|
|
29
29
|
}
|
|
30
30
|
get language() {
|
|
31
|
-
return this.#language ?? document?.documentElement?.getAttribute("lang");
|
|
31
|
+
return this.#language ?? globalThis?.document?.head?.querySelector('meta[name="gringow-default-language"]')?.getAttribute("content") ?? globalThis?.document?.documentElement?.getAttribute("lang");
|
|
32
32
|
}
|
|
33
33
|
constructor() {
|
|
34
34
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -94,7 +94,7 @@ var GringowStoreSingleton = class _GringowStoreSingleton {
|
|
|
94
94
|
return _GringowStoreSingleton.instance;
|
|
95
95
|
}
|
|
96
96
|
get cacheUrl() {
|
|
97
|
-
return this.#cacheUrl ?? document
|
|
97
|
+
return this.#cacheUrl ?? globalThis?.document?.head?.querySelector('meta[name="gringow-cache-url"]')?.getAttribute("content") ?? globalThis?.document?.documentElement?.getAttribute("data-gringow-cache-url");
|
|
98
98
|
}
|
|
99
99
|
set cacheUrl(value) {
|
|
100
100
|
if (typeof value !== "string" || value.trim().length <= 0) return;
|
|
@@ -111,7 +111,7 @@ var GringowStoreSingleton = class _GringowStoreSingleton {
|
|
|
111
111
|
this.#language = value;
|
|
112
112
|
}
|
|
113
113
|
get language() {
|
|
114
|
-
return this.#language ?? document?.documentElement?.getAttribute("lang");
|
|
114
|
+
return this.#language ?? globalThis?.document?.head?.querySelector('meta[name="gringow-default-language"]')?.getAttribute("content") ?? globalThis?.document?.documentElement?.getAttribute("lang");
|
|
115
115
|
}
|
|
116
116
|
constructor() {
|
|
117
117
|
}
|