Skip to content

Commit 01ffb52

Browse files
committed
fix: 修复推荐作品列表预览问题
1 parent 01090a9 commit 01ffb52

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

pixiv previewer.user.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// @name:zh-CN Pixiv Previewer (Dev)
66
// @name:zh-TW Pixiv Previewer (Dev)
77
// @namespace https://github.com/Ocrosoft/PixivPreviewer
8-
// @version 3.8.3
8+
// @version 3.8.4
99
// @description Display preview images (support single image, multiple images, moving images); Download animation(.zip); Sorting the search page by favorite count(and display it).
1010
// @description:zh-CN 显示预览图(支持单图,多图,动图);动图压缩包下载;搜索页按热门度(收藏数)排序并显示收藏数。
1111
// @description:ja プレビュー画像の表示(単一画像、複数画像、動画のサポート); アニメーションのダウンロード(.zip); お気に入りの数で検索ページをソートします(そして表示します)。
@@ -1153,8 +1153,28 @@ function findLiByImgTag() {
11531153
lis.push(el);
11541154
break;
11551155
}
1156+
// <ul> 套 <div>(当 ul 用) 再套 <div>
1157+
// 作品页收藏后弹出的推荐作品
1158+
// <ul>
1159+
// <div>
1160+
// <div></div>
1161+
// <div></div>
1162+
// </div>
1163+
// </ul>
1164+
if (el.parent().parent().length > 0 &&
1165+
el.parent().parent().get(0).tagName == 'UL' &&
1166+
el.parent().parent().children().length == 1) {
1167+
lis.push(el);
1168+
break;
1169+
}
11561170
// <ul> 套 <div>
1157-
if (el.parent().length > 0 && el.parent().get(0).tagName == 'UL') {
1171+
// <ul>
1172+
// <div></div>
1173+
// <div></div>
1174+
// </ul>
1175+
if (el.parent().length > 0 &&
1176+
el.parent().get(0).tagName == 'UL' &&
1177+
el.parent().children().length > 1) {
11581178
lis.push(el);
11591179
break;
11601180
}

0 commit comments

Comments
 (0)