fix: buttons don't appear

This commit is contained in:
Xmader 2020-08-26 04:49:57 -04:00
parent b50552bf12
commit f98874acd8
1 changed files with 2 additions and 2 deletions

View File

@ -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