Skip to content

Commit

Permalink
Update Bilibili Download Pictures.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
owendswang authored Nov 20, 2023
1 parent 12d8969 commit b3e2207
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Bilibili Download Pictures.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Bilibili Download Pictures
// @name:zh-CN 下载Bilibili动态页面图片
// @version 0.8.0
// @version 0.9.0
// @description Download pictures from bilibili timeline
// @description:zh-CN 下载“Bilibili动态”时间线页面的图片
// @author OWENDSWANG
Expand Down Expand Up @@ -111,7 +111,8 @@
// console.log('click');
event.preventDefault();
const content = this.closest('div.bili-dyn-item__main');
const list = content.querySelectorAll('div.bili-album__preview__picture__img');
// console.log(content);
const list = content.querySelectorAll('div.bili-album__preview__picture,div.preview__picture__img.b-img');
// console.log(list);
if (list.length > 0) {
for (let j = 0; j < list.length; j++) {
Expand Down Expand Up @@ -227,7 +228,7 @@
// console.log('add download button');
card.getElementsByClassName('bili-album__preview__picture__img').forEach((img) => {
img.addEventListener('click', function(event) {
addDownloadButton(card);
addDownloadButton(card);
});
});
addDownloadButton(card);
Expand Down

0 comments on commit b3e2207

Please sign in to comment.