Skip to content

Commit

Permalink
修复搜狐新闻图片不显示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
AirBashX committed Nov 16, 2023
1 parent 3589df3 commit ddd5b2a
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions AutoUnfold.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 自动展开
// @version 1.3.63
// @version 1.3.64
// @namespace https://github.com/AirBashX/AutoUnfold/
// @homepageURL https://github.com/AirBashX/UserScript
// @author airbash
Expand Down Expand Up @@ -592,21 +592,10 @@
name: "搜狐新闻",
url: "sohu.com/a",
handles: [
//展开
//展开剩余n%
{
type: "display",
item: ".lookall-box",
},
//移动+PC版
{
type: "classList",
item: ".hidden-content",
remove: "hide",
},
{
type: "classList",
item: ".hidden-content",
remove: "control-hide",
type: "clickN",
item: "#artLookAll",
},
],
},
Expand Down Expand Up @@ -1449,14 +1438,21 @@
for (let item of items) {
item.classList.remove(handle.remove);
}
} else {
//模拟点击
} else if (handle.type == "click") {
//模拟一次点击
for (let item of items) {
if (item != null && item.getAttribute("opened") != "yes") {
item.click();
item.setAttribute("opened", "yes");
}
}
}else {
//模拟多次点击
for (let item of items) {
if (item) {
item.click();
}
}
}
}
}
Expand Down

0 comments on commit ddd5b2a

Please sign in to comment.