fix?
This commit is contained in:
parent
ba7560288b
commit
5f5bf04e1f
3 changed files with 8 additions and 70 deletions
43
dist/pupu.js
vendored
43
dist/pupu.js
vendored
|
|
@ -3513,9 +3513,6 @@
|
|||
function isPyonLoader() {
|
||||
return pyonLoaderIdentity != null;
|
||||
}
|
||||
function isPupuLoader() {
|
||||
return pyonLoaderIdentity != null;
|
||||
}
|
||||
function polyfillVendettaLoaderIdentity() {
|
||||
if (!isPyonLoader() || isVendettaLoader())
|
||||
return null;
|
||||
|
|
@ -3564,8 +3561,6 @@
|
|||
function getLoaderName() {
|
||||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.loaderName;
|
||||
else if (isPupuLoader())
|
||||
return pyonLoaderIdentity.loaderName;
|
||||
else if (isVendettaLoader())
|
||||
return vendettaLoaderIdentity.name;
|
||||
return "Unknown";
|
||||
|
|
@ -3573,15 +3568,11 @@
|
|||
function getLoaderVersion() {
|
||||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.loaderVersion;
|
||||
if (isPupuLoader())
|
||||
return pyonLoaderIdentity.loaderVersion;
|
||||
return null;
|
||||
}
|
||||
function isLoaderConfigSupported() {
|
||||
if (isPyonLoader()) {
|
||||
return true;
|
||||
} else if (isPyonLoader()) {
|
||||
return true;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.loaderConfig;
|
||||
}
|
||||
|
|
@ -3590,8 +3581,6 @@
|
|||
function isThemeSupported() {
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.themes != null;
|
||||
}
|
||||
|
|
@ -3600,8 +3589,6 @@
|
|||
function getStoredTheme() {
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isVendettaLoader()) {
|
||||
var themeProp = vendettaLoaderIdentity.features.themes?.prop;
|
||||
if (!themeProp)
|
||||
|
|
@ -3613,9 +3600,6 @@
|
|||
function getThemeFilePath() {
|
||||
if (isPyonLoader()) {
|
||||
return "pyoncord/current-theme.json";
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return "pyoncord/current-theme.json";
|
||||
} else if (isVendettaLoader()) {
|
||||
return "vendetta_theme.json";
|
||||
}
|
||||
|
|
@ -3625,9 +3609,6 @@
|
|||
if (isPyonLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.devtools != null;
|
||||
}
|
||||
|
|
@ -3640,10 +3621,6 @@
|
|||
window.__pyoncord_rdt = window.__reactDevTools.exports;
|
||||
return "__pyoncord_rdt";
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
window.__pyoncord_rdt = window.__reactDevTools.exports;
|
||||
return "__pyoncord_rdt";
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.devtools.prop;
|
||||
}
|
||||
|
|
@ -3655,9 +3632,6 @@
|
|||
if (isPyonLoader()) {
|
||||
return window.__reactDevTools.version || null;
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return window.__reactDevTools.version || null;
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.devtools.version;
|
||||
}
|
||||
|
|
@ -3666,8 +3640,6 @@
|
|||
function isSysColorsSupported() {
|
||||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.isSysColorsSupported;
|
||||
if (isPupuLoader())
|
||||
return pyonLoaderIdentity.isSysColorsSupported;
|
||||
else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.syscolors != null;
|
||||
}
|
||||
|
|
@ -3678,9 +3650,6 @@
|
|||
return null;
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.syscolors.prop;
|
||||
}
|
||||
|
|
@ -3689,8 +3658,6 @@
|
|||
function getLoaderConfigPath() {
|
||||
if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isVendettaLoader()) {
|
||||
return "vendetta_loader.json";
|
||||
}
|
||||
|
|
@ -3699,8 +3666,6 @@
|
|||
function isFontSupported() {
|
||||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.fontPatch === 2;
|
||||
if (isPupuLoader())
|
||||
return pyonLoaderIdentity.fontPatch === 2;
|
||||
return false;
|
||||
}
|
||||
var pyonLoaderIdentity, pupuLoaderIdentity, vendettaLoaderIdentity;
|
||||
|
|
@ -3710,7 +3675,7 @@
|
|||
init_asyncIteratorSymbol();
|
||||
init_promiseAllSettled();
|
||||
pyonLoaderIdentity = globalThis.__PYON_LOADER__;
|
||||
pupuLoaderIdentity = globalThis.__PYON_LOADER__;
|
||||
pupuLoaderIdentity = globalThis.__PUPU_LOADER__;
|
||||
vendettaLoaderIdentity = globalThis.__vendetta_loader;
|
||||
getVendettaLoaderIdentity();
|
||||
}
|
||||
|
|
@ -4681,7 +4646,7 @@
|
|||
init_logger();
|
||||
init_toasts();
|
||||
import_react_native5 = __toESM(require_react_native());
|
||||
versionHash = "v0.0.2-test5";
|
||||
versionHash = "v0.0.3";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -15225,7 +15190,7 @@
|
|||
uri: pupu_default
|
||||
},
|
||||
render: () => Promise.resolve().then(() => (init_General(), General_exports)),
|
||||
useTrailing: () => `(${"v0.0.2-test5"})`
|
||||
useTrailing: () => `(${"v0.0.3"})`
|
||||
},
|
||||
{
|
||||
key: "BUNNY_PLUGINS",
|
||||
|
|
@ -15726,7 +15691,7 @@
|
|||
alert([
|
||||
"Failed to load Pupu!\n",
|
||||
`Build Number: ${ClientInfoManager.Build}`,
|
||||
`Pupu: ${"v0.0.2-test5"}`,
|
||||
`Pupu: ${"v0.0.3"}`,
|
||||
stack || e?.toString?.()
|
||||
].join("\n"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ const config = {
|
|||
constModules: {
|
||||
globals: {
|
||||
"bunny-build-info": {
|
||||
version: `"v0.0.2-test5"`
|
||||
version: `"v0.0.3"`
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ import { VdThemeInfo } from "@lib/addons/themes";
|
|||
|
||||
// @ts-ignore
|
||||
const pyonLoaderIdentity = globalThis.__PYON_LOADER__;
|
||||
|
||||
// @ts-ignore
|
||||
const pupuLoaderIdentity = globalThis.__PYON_LOADER__;
|
||||
const pupuLoaderIdentity = globalThis.__PUPU_LOADER__;
|
||||
|
||||
// @ts-ignore
|
||||
const vendettaLoaderIdentity = globalThis.__vendetta_loader;
|
||||
|
||||
|
|
@ -82,8 +84,6 @@ function polyfillVendettaLoaderIdentity() {
|
|||
export function getLoaderIdentity() {
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity;
|
||||
} else if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity();
|
||||
} else if (isVendettaLoader()) {
|
||||
return getVendettaLoaderIdentity();
|
||||
}
|
||||
|
|
@ -102,7 +102,6 @@ getVendettaLoaderIdentity();
|
|||
|
||||
export function getLoaderName() {
|
||||
if (isPyonLoader()) return pyonLoaderIdentity.loaderName;
|
||||
else if (isPupuLoader()) return pyonLoaderIdentity.loaderName;
|
||||
else if (isVendettaLoader()) return vendettaLoaderIdentity.name;
|
||||
|
||||
return "Unknown";
|
||||
|
|
@ -110,15 +109,12 @@ export function getLoaderName() {
|
|||
|
||||
export function getLoaderVersion(): string | null {
|
||||
if (isPyonLoader()) return pyonLoaderIdentity.loaderVersion;
|
||||
if (isPupuLoader()) return pyonLoaderIdentity.loaderVersion;
|
||||
return null;
|
||||
}
|
||||
|
||||
export function isLoaderConfigSupported() {
|
||||
if (isPyonLoader()) {
|
||||
return true;
|
||||
} else if (isPyonLoader()) {
|
||||
return true;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.loaderConfig;
|
||||
}
|
||||
|
|
@ -129,8 +125,6 @@ export function isLoaderConfigSupported() {
|
|||
export function isThemeSupported() {
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.themes != null;
|
||||
}
|
||||
|
|
@ -141,8 +135,6 @@ export function isThemeSupported() {
|
|||
export function getStoredTheme(): VdThemeInfo | null {
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isVendettaLoader()) {
|
||||
const themeProp = vendettaLoaderIdentity!!.features.themes?.prop;
|
||||
if (!themeProp) return null;
|
||||
|
|
@ -156,8 +148,6 @@ export function getStoredTheme(): VdThemeInfo | null {
|
|||
export function getThemeFilePath() {
|
||||
if (isPyonLoader()) {
|
||||
return "pyoncord/current-theme.json";
|
||||
} if (isPupuLoader()) {
|
||||
return "pyoncord/current-theme.json";
|
||||
} else if (isVendettaLoader()) {
|
||||
return "vendetta_theme.json";
|
||||
}
|
||||
|
|
@ -169,9 +159,6 @@ export function isReactDevToolsPreloaded() {
|
|||
if (isPyonLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.devtools != null;
|
||||
}
|
||||
|
|
@ -187,11 +174,6 @@ export function getReactDevToolsProp(): string | null {
|
|||
return "__pyoncord_rdt";
|
||||
}
|
||||
|
||||
if (isPupuLoader()) {
|
||||
window.__pyoncord_rdt = window.__reactDevTools.exports;
|
||||
return "__pyoncord_rdt";
|
||||
}
|
||||
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.devtools!!.prop;
|
||||
}
|
||||
|
|
@ -205,9 +187,6 @@ export function getReactDevToolsVersion() {
|
|||
if (isPyonLoader()) {
|
||||
return window.__reactDevTools.version || null;
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return window.__reactDevTools.version || null;
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.devtools!!.version;
|
||||
}
|
||||
|
|
@ -217,7 +196,6 @@ export function getReactDevToolsVersion() {
|
|||
|
||||
export function isSysColorsSupported() {
|
||||
if (isPyonLoader()) return pyonLoaderIdentity.isSysColorsSupported;
|
||||
if (isPupuLoader()) return pyonLoaderIdentity.isSysColorsSupported;
|
||||
else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.syscolors != null;
|
||||
}
|
||||
|
|
@ -229,8 +207,6 @@ export function getSysColors() {
|
|||
if (!isSysColorsSupported()) return null;
|
||||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} if (isPupuLoader()) {
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.syscolors!!.prop;
|
||||
}
|
||||
|
|
@ -241,8 +217,6 @@ export function getSysColors() {
|
|||
export function getLoaderConfigPath() {
|
||||
if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isVendettaLoader()) {
|
||||
return "vendetta_loader.json";
|
||||
}
|
||||
|
|
@ -252,7 +226,6 @@ export function getLoaderConfigPath() {
|
|||
|
||||
export function isFontSupported() {
|
||||
if (isPyonLoader()) return pyonLoaderIdentity.fontPatch === 2;
|
||||
if (isPupuLoader()) return pyonLoaderIdentity.fontPatch === 2;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue