Skip to content

Commit

Permalink
fix: 検索対象のElementのclassNameを変更 (#263)
Browse files Browse the repository at this point in the history
これにより画像ギャラリーがない投稿でも一括保存ボタン等が埋め込まれるはず
  • Loading branch information
mnao305 authored Jul 5, 2022
1 parent 1e13bd4 commit cabbbb3
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 @@ -70,7 +70,7 @@ const main = () => {
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
// 対象のElementが見つかるまでループ
if ((mutation.target as HTMLElement).className === 'content-block type-photo-gallery ng-scope') {
if ((mutation.target as HTMLElement).className.includes('content-block')) {
// 投稿ページ全体一括保存ボタン作成
const postBtnEl = document.getElementsByClassName('post-btns')
if (postBtnEl.length > 0) {
Expand Down

0 comments on commit cabbbb3

Please sign in to comment.