fix: find copy file button group element

This commit is contained in:
EnixCoda 2021-01-29 02:01:20 +08:00
parent 8c53037d8f
commit 83f357008e
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -129,7 +129,7 @@ export function getCodeElement() {
export function attachCopyFileBtn() {
if (getCurrentPageType() === PAGE_TYPES.RAW_TEXT) {
// the button group in file content header
const buttonGroupSelector = '.repository-content > .Box > .Box-header .BtnGroup'
const buttonGroupSelector = '.repository-content .Box-header .BtnGroup'
const buttonGroups = document.querySelectorAll(buttonGroupSelector)
if (buttonGroups.length === 0) {