From 0832c9484d70190e2137f6520de7e04adf4fdb41 Mon Sep 17 00:00:00 2001 From: Xmader Date: Fri, 20 Nov 2020 10:18:50 -0500 Subject: [PATCH] feat: continuously try to show external window --- src/btn.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/btn.ts b/src/btn.ts index e9afaef..fe37e9a 100644 --- a/src/btn.ts +++ b/src/btn.ts @@ -120,6 +120,13 @@ export class BtnList { const observer = new MutationObserver(() => { // check if the buttons are still in document when dom updates if (!document.contains(el)) { + try { + this.getBtnParent() + } catch { + observer.disconnect() + this.commit(BtnListMode.ExtWindow) + } + // re-commit // performance issue? el = this._commit()