mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Preact: Support custom colors (#2385)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
This commit is contained in:
parent
dbff485823
commit
48cb201300
|
|
@ -17,6 +17,7 @@ import type { Battle } from './battle';
|
|||
import type { BattleScene } from './battle-animations';
|
||||
import { Dex, Teams, toID, toRoomid, toUserid, type ID } from './battle-dex';
|
||||
import { BattleTextParser, type Args, type KWArgs } from './battle-text-parser';
|
||||
import { Net } from './client-connection'; // optional
|
||||
|
||||
// Caja
|
||||
declare const html4: any;
|
||||
|
|
@ -1784,3 +1785,10 @@ export class BattleLog {
|
|||
return 'data:text/plain;base64,' + encodeURIComponent(btoa(unescape(encodeURIComponent(replayFile))));
|
||||
}
|
||||
}
|
||||
|
||||
if (window.Net) {
|
||||
Net(`/config/colors.json`).get().then(response => {
|
||||
const data = JSON.parse(response);
|
||||
Object.assign(Config.customcolors, data);
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user