diff options
Diffstat (limited to 'src/content/usecases')
-rw-r--r-- | src/content/usecases/AddonEnabledUseCase.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/content/usecases/AddonEnabledUseCase.ts b/src/content/usecases/AddonEnabledUseCase.ts index b45c47f..f49fde5 100644 --- a/src/content/usecases/AddonEnabledUseCase.ts +++ b/src/content/usecases/AddonEnabledUseCase.ts @@ -34,10 +34,12 @@ export default class AddonEnabledUseCase { private async setEnabled(on: boolean): Promise<void> { this.repository.set(on); - if (on) { - this.consoleFramePresenter.attach(); - } else { - this.consoleFramePresenter.detach(); + if (this.consoleFramePresenter.isTopWindow()) { + if (on) { + this.consoleFramePresenter.attach(); + } else { + this.consoleFramePresenter.detach(); + } } await this.indicator.setEnabled(on); } |