From 03e7f1cae314aeb55feeb93408c75dfd1a137af4 Mon Sep 17 00:00:00 2001 From: Xmader Date: Mon, 23 Nov 2020 11:52:28 -0500 Subject: [PATCH] fix: btn list display anti-detection --- src/btn.css | 3 +++ src/btn.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/btn.css b/src/btn.css index 48ca29e..0bd9b06 100644 --- a/src/btn.css +++ b/src/btn.css @@ -3,6 +3,9 @@ div { display: flex; align-items: center; font-family: 'Open Sans', 'Roboto', 'Helvetica neue', Helvetica, sans-serif; + position: absolute; + z-index: 999; + background: #f6f6f6; } button { diff --git a/src/btn.ts b/src/btn.ts index 2e375e4..9be3ab1 100644 --- a/src/btn.ts +++ b/src/btn.ts @@ -98,9 +98,9 @@ export class BtnList { // hide buttons using the shadow DOM const newParent = btnParent.cloneNode(false) as HTMLDivElement newParent.append(...this.list.map(e => e.cloneNode(true))) - const slot = document.createElement('slot') - newParent.append(slot) shadow.append(newParent) + const slot = document.createElement('slot') + shadow.append(slot) return btnParent }