🆙 Add cms i using 🆙

This commit is contained in:
Remco committed 2025-11-25 22:42:56 +01:00
1 parent 94704e0925
commit d44196149e
35591 files changed
+3601123

No files matched your search

File diff suppressed because it is too large. Load diff
+24
View File
@@ -0,0 +1,24 @@
const context = (() => {
if (typeof globalThis !== "undefined") {
return globalThis;
} else if (typeof self !== "undefined") {
return self;
} else if (typeof window !== "undefined") {
return window;
} else {
return Function("return this")();
}
})();
const defines = __DEFINES__;
Object.keys(defines).forEach((key) => {
const segments = key.split(".");
let target = context;
for (let i = 0; i < segments.length; i++) {
const segment = segments[i];
if (i === segments.length - 1) {
target[segment] = defines[key];
} else {
target = target[segment] || (target[segment] = {});
}
}
});