mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 12:34:17 +00:00
add joker parser from b64
This commit is contained in:
@@ -1477,8 +1477,9 @@ async function decodePackedString(encodedString: string): Promise<JsonValue> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function parseJokersFromString(str: string) {
|
async function parseJokersFromString(str: string) {
|
||||||
if (str.startsWith('7z')) {
|
if (str.toLowerCase().startsWith('7z')) {
|
||||||
const decoded = await decodePackedString(str)
|
const decoded = await decodePackedString(str)
|
||||||
|
console.log(decoded)
|
||||||
if (decoded && typeof decoded === 'object' && 'cards' in decoded) {
|
if (decoded && typeof decoded === 'object' && 'cards' in decoded) {
|
||||||
return Object.values(decoded.cards as any).map(
|
return Object.values(decoded.cards as any).map(
|
||||||
(c: any) => c.save_fields.center
|
(c: any) => c.save_fields.center
|
||||||
|
|||||||
Reference in New Issue
Block a user