fix: get btn container
This commit is contained in:
parent
935b56e4d2
commit
1f62f47dc8
|
@ -9,7 +9,7 @@ import btnListCss from './btn.css'
|
||||||
type BtnElement = HTMLButtonElement
|
type BtnElement = HTMLButtonElement
|
||||||
|
|
||||||
const getBtnContainer = (): HTMLDivElement => {
|
const getBtnContainer = (): HTMLDivElement => {
|
||||||
const container = document.querySelectorAll('aside>section>section')[0]
|
const container = document.querySelectorAll('section>section>section>section')[0]
|
||||||
const btnParent = [...container.children].find((div) => {
|
const btnParent = [...container.children].find((div) => {
|
||||||
const b = div.querySelector('button, .button')
|
const b = div.querySelector('button, .button')
|
||||||
const text = b ? b.outerHTML.replace(/\s/g, '') : ''
|
const text = b ? b.outerHTML.replace(/\s/g, '') : ''
|
||||||
|
|
Loading…
Reference in New Issue