backwards compatibility
This commit is contained in:
parent
d79f28b929
commit
56693a8446
2 changed files with 29 additions and 9 deletions
19
dist/pupu.js
vendored
19
dist/pupu.js
vendored
|
|
@ -3573,11 +3573,15 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -3587,7 +3591,7 @@
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.hasThemeSupport;
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.themes != null;
|
||||
}
|
||||
|
|
@ -3597,7 +3601,7 @@
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.storedTheme;
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isVendettaLoader()) {
|
||||
var themeProp = vendettaLoaderIdentity.features.themes?.prop;
|
||||
if (!themeProp)
|
||||
|
|
@ -3621,6 +3625,9 @@
|
|||
if (isPyonLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.devtools != null;
|
||||
}
|
||||
|
|
@ -3660,7 +3667,7 @@
|
|||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.isSysColorsSupported;
|
||||
if (isPupuLoader())
|
||||
return pupuLoaderIdentity.isSysColorsSupported;
|
||||
return pyonLoaderIdentity.isSysColorsSupported;
|
||||
else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.syscolors != null;
|
||||
}
|
||||
|
|
@ -3673,7 +3680,7 @@
|
|||
return pyonLoaderIdentity.sysColors;
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.sysColors;
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity.features.syscolors.prop;
|
||||
}
|
||||
|
|
@ -3682,6 +3689,8 @@
|
|||
function getLoaderConfigPath() {
|
||||
if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isPyonLoader()) {
|
||||
return "pyoncord/loader.json";
|
||||
} else if (isVendettaLoader()) {
|
||||
return "vendetta_loader.json";
|
||||
}
|
||||
|
|
@ -3690,6 +3699,8 @@
|
|||
function isFontSupported() {
|
||||
if (isPyonLoader())
|
||||
return pyonLoaderIdentity.fontPatch === 2;
|
||||
if (isPupuLoader())
|
||||
return pyonLoaderIdentity.fontPatch === 2;
|
||||
return false;
|
||||
}
|
||||
var pyonLoaderIdentity, pupuLoaderIdentity, vendettaLoaderIdentity;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export function getLoaderIdentity() {
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity;
|
||||
} else if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity();
|
||||
return pyonLoaderIdentity();
|
||||
} else if (isVendettaLoader()) {
|
||||
return getVendettaLoaderIdentity();
|
||||
}
|
||||
|
|
@ -110,12 +110,15 @@ 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;
|
||||
}
|
||||
|
|
@ -127,7 +130,7 @@ export function isThemeSupported() {
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.hasThemeSupport;
|
||||
return pyonLoaderIdentity.hasThemeSupport;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.themes != null;
|
||||
}
|
||||
|
|
@ -139,7 +142,7 @@ export function getStoredTheme(): VdThemeInfo | null {
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.storedTheme;
|
||||
return pyonLoaderIdentity.storedTheme;
|
||||
} else if (isVendettaLoader()) {
|
||||
const themeProp = vendettaLoaderIdentity!!.features.themes?.prop;
|
||||
if (!themeProp) return null;
|
||||
|
|
@ -166,6 +169,9 @@ export function isReactDevToolsPreloaded() {
|
|||
if (isPyonLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isPupuLoader()) {
|
||||
return Boolean(window.__reactDevTools);
|
||||
}
|
||||
if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.devtools != null;
|
||||
}
|
||||
|
|
@ -211,7 +217,7 @@ export function getReactDevToolsVersion() {
|
|||
|
||||
export function isSysColorsSupported() {
|
||||
if (isPyonLoader()) return pyonLoaderIdentity.isSysColorsSupported;
|
||||
if (isPupuLoader()) return pupuLoaderIdentity.isSysColorsSupported;
|
||||
if (isPupuLoader()) return pyonLoaderIdentity.isSysColorsSupported;
|
||||
else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.syscolors != null;
|
||||
}
|
||||
|
|
@ -224,7 +230,7 @@ export function getSysColors() {
|
|||
if (isPyonLoader()) {
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} if (isPupuLoader()) {
|
||||
return pupuLoaderIdentity.sysColors;
|
||||
return pyonLoaderIdentity.sysColors;
|
||||
} else if (isVendettaLoader()) {
|
||||
return vendettaLoaderIdentity!!.features.syscolors!!.prop;
|
||||
}
|
||||
|
|
@ -235,6 +241,8 @@ 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";
|
||||
}
|
||||
|
|
@ -244,6 +252,7 @@ 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