fix: buttons don't appear
This commit is contained in:
parent
b50552bf12
commit
f98874acd8
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ type BtnElement = HTMLElement
|
||||||
* Select the original Download Button
|
* Select the original Download Button
|
||||||
*/
|
*/
|
||||||
export const getDownloadBtn = (): BtnElement => {
|
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
|
const btn = btnsDiv.querySelector('button, .button') as BtnElement
|
||||||
btn.onclick = null
|
btn.onclick = null
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ export class BtnList {
|
||||||
constructor (private templateBtn: BtnElement) { }
|
constructor (private templateBtn: BtnElement) { }
|
||||||
|
|
||||||
add (options: BtnOptions): 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 textNode = [...btn.childNodes].find((x) => {
|
||||||
const txt = x.textContent as string
|
const txt = x.textContent as string
|
||||||
|
|
Loading…
Reference in a new issue