From f98874acd8afd0266a8f27d733e40c90d4cdaf50 Mon Sep 17 00:00:00 2001 From: Xmader Date: Wed, 26 Aug 2020 04:49:57 -0400 Subject: [PATCH] fix: buttons don't appear --- src/btn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/btn.ts b/src/btn.ts index d7687b8..1a0b15c 100644 --- a/src/btn.ts +++ b/src/btn.ts @@ -5,7 +5,7 @@ type BtnElement = HTMLElement * Select the original Download Button */ export const getDownloadBtn = (): BtnElement => { - const btnsDiv = document.querySelector('.score-right .buttons-wrapper') || document.querySelectorAll('aside section > div')[4] + const btnsDiv = document.querySelector('.score-right .buttons-wrapper') || document.querySelectorAll('aside section section > div')[4] const btn = btnsDiv.querySelector('button, .button') as BtnElement btn.onclick = null @@ -36,7 +36,7 @@ export class BtnList { constructor (private templateBtn: BtnElement) { } add (options: BtnOptions): BtnElement { - const btn: HTMLButtonElement = this.templateBtn.cloneNode(true) as any + const btn = this.templateBtn.cloneNode(true) as HTMLButtonElement const textNode = [...btn.childNodes].find((x) => { const txt = x.textContent as string