fixup explorer anchor links

pull/10070/head
Niklas Fiekas 2021-11-02 19:17:28 +01:00
parent d3fa2c77d6
commit 3c36e16299
1 changed files with 3 additions and 3 deletions

View File

@ -63,9 +63,9 @@ export default class ExplorerCtrl {
if ((parts[0] == '#explorer' || parts[0] == '#opening') && !this.root.embed) {
this.enabled(true);
if (parts[1] == 'lichess' || parts[1] === 'masters') this.config.data.db(parts[1]);
else if (parts[2]?.match(/[A-Za-z0-9_-]{2,30}/)) {
this.config.selectPlayer(parts[2]);
this.config.data.color(parts[3] == 'black' ? 'black' : 'white');
else if (parts[1]?.match(/[A-Za-z0-9_-]{2,30}/)) {
this.config.selectPlayer(parts[1]);
this.config.data.color(parts[2] == 'black' ? 'black' : 'white');
}
if (e) this.root.redraw();
}