mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-11 21:38:42 -05:00
Support /debug nw
This opens the desktop client's debugger, which for some reason doesn't open the way NW.js's documentation says it should.
This commit is contained in:
@@ -547,6 +547,12 @@
|
||||
type: 'modal',
|
||||
htmlMessage: "Extracted team data:<br /><textarea rows=\"10\" cols=\"60\">" + BattleLog.escapeHTML(JSON.stringify(Storage.teams)) + "</textarea>"
|
||||
});
|
||||
} else if (target === 'nw') {
|
||||
try {
|
||||
nw.Window.get().showDevTools();
|
||||
} catch (e) {
|
||||
this.add('|error|' + e.message);
|
||||
}
|
||||
} else {
|
||||
this.add('|error|Unknown debug command.');
|
||||
this.add('|error|Are you looking for /showdebug and /hidedebug?');
|
||||
|
||||
Reference in New Issue
Block a user