diff --git a/js/client-battle.js b/js/client-battle.js index 039671d733..9d485d424f 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -1407,6 +1407,7 @@ buf += '
All battles
'; buf += ''; buf += ''; + buf += ''; buf += ''; if (rightPanelBattlesPossible) buf += ''; buf += ''; @@ -1418,6 +1419,7 @@ 'change input[name=ignoreopp]': 'toggleIgnoreOpponent', 'change input[name=hardcoremode]': 'toggleHardcoreMode', 'change input[name=allignorespects]': 'toggleAllIgnoreSpects', + 'change input[name=allignoreopp]': 'toggleAllIgnoreOpponent', 'change input[name=autotimer]': 'toggleAutoTimer', 'change input[name=rightpanelbattles]': 'toggleRightPanelBattles' }, @@ -1443,7 +1445,7 @@ toggleAllIgnoreSpects: function (e) { var ignoreSpects = !!e.currentTarget.checked; Dex.prefs('ignorespects', ignoreSpects); - if (ignoreSpects && !this.battle.ignoreSpects) this.$el.find('input[name=ignoreSpects]').click(); + if (ignoreSpects && !this.battle.ignoreSpects) this.$el.find('input[name=ignorespects]').click(); }, toggleIgnoreNicks: function (e) { this.battle.ignoreNicks = !!e.currentTarget.checked; @@ -1456,6 +1458,11 @@ this.battle.add('Opponent ' + (this.battle.ignoreOpponent ? '' : 'no longer ') + 'ignored.'); this.battle.resetToCurrentTurn(); }, + toggleAllIgnoreOpponent: function (e) { + var ignoreOpponent = !!e.currentTarget.checked; + Dex.prefs('ignoreopp', ignoreOpponent); + if (ignoreOpponent && !this.battle.ignoreOpponent) this.$el.find('input[name=ignoreopp]').click(); + }, toggleAutoTimer: function (e) { var autoTimer = !!e.currentTarget.checked; Dex.prefs('autotimer', autoTimer); diff --git a/src/battle.ts b/src/battle.ts index 9051f1da4a..ed185a2ae9 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -1077,7 +1077,7 @@ class Battle { roomid = ''; hardcoreMode = false; ignoreNicks = !!Dex.prefs('ignorenicks'); - ignoreOpponent = false; + ignoreOpponent = !!Dex.prefs('ignoreopp'); ignoreSpects = !!Dex.prefs('ignorespects'); debug = false; joinButtons = false;