修复组图中第3张图重复

This commit is contained in:
xing 2020-04-10 09:08:41 +08:00
parent a8fa3667f1
commit aa30fa16a6

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name tieba page // @name tieba page
// @namespace https://github.com/fthvgb1/tampermonkey-script // @namespace https://github.com/fthvgb1/tampermonkey-script
// @version 0.999 // @version 1.000
// @author fthvgb1 // @author fthvgb1
// @match https://tieba.baidu.com/* // @match https://tieba.baidu.com/*
// @match https://tiebac.baidu.com/* // @match https://tiebac.baidu.com/*
@ -215,9 +215,9 @@
dataType: 'json', dataType: 'json',
success: res => { success: res => {
let imgs = res.data.images; let imgs = res.data.images;
imgs.splice(0, 2); imgs.splice(0, 3);
imgs.forEach((img, i) => { imgs.forEach((img, i) => {
if (i > num - 3) { if (i > num - 4) {
return; return;
} }
let div = document.createElement('div'); let div = document.createElement('div');