Skip to content

Commit

Permalink
fix: 「Download All」ボタンが表示されない (#509)
Browse files Browse the repository at this point in the history
* fix condition to elements count instead compare className

* tiny fix
  • Loading branch information
killinsun authored Jan 20, 2024
1 parent 6d2fbd1 commit cdff05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const main = () => {
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
// 投稿ページ全体一括保存ボタン作成
if (!postBtnFlag && (mutation.target as HTMLElement).className.includes('post-btns')) {
if (!postBtnFlag && document.getElementsByClassName('post-btns').length > 0) {
const postBtnEl = document.getElementsByClassName('post-btns')
injectPageAllContentsDlBtn((postBtnEl[0] as HTMLElement))
postBtnFlag = true
Expand Down

0 comments on commit cdff05f

Please sign in to comment.