⭐Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page) ⭐, support various forums, social networking, games, comics, novels, academics, search engines (Google, Bing, Yahoo...) and other websites~
看了下,这网站默认对加了个 opacity: 0;
的 CSS 样式(即透明度 0%)。
网站会在懒加载图片后,给图片加上一个 Class loaded
,其实就是给图片加了个 opacity: 1;
CSS 样式(恢复为 100% 透明度)。
因此你只需要加个 style 规则,强制图片始终 100% 透明度即可。
"style": "img[data-src] {opacity: 1 !important;}",
我对你写的这个规则优化了下,主要是加上了 style 及修改了 pageE 规则。
你原来写的那个会导致从第 3 页开始插入位置就错误了,插到了上面去了(.page-header 紧挨着的 div 后面了)。我把 +div
改成了 ~div
,这样插入位置就是最后一个 div 后面了(虽然网页中只有这 1 个 div,但是当脚本翻页后续插入多个时,就有多个 div 了,要确保插入到最后面)。
另外,url 规则里,你不能排除 /
,因为搜索页第一页就是 /?s=XX
,所以我改了改,这个规则适用于分类页、标签页、搜索页。
"HuangboAV": {
"host": "huangboav.com",
"url": "return (fun.indexOF(/^\\/(category|tag)\\//) || fun.indexOF('s=','s'))",
"style": "img[data-src] {opacity: 1 !important;}",
"pager": {
"nextL": "//a[@class='current']/parent::li/following-sibling::li[1]/a",
"pageE": ".page-header~div:not(.pagination)",
"replaceE": ".pagination"
},
"function": {
"bF": "return fun.src_bF(pageE, [0,'img[data-src]','data-src'])"
}
}
"huangboav": {
"host": "huangboav.com",
"url": "return (fun.lp() != '/')",
"pager": {
"nextL": "//a[text()='Next']",
"pageE": ".page-header + div",
"replaceE": ".pagination"
},
"function": {
"bF": "return fun.src_bF(pageE, [0,'img[data-src]','data-src'])"
}
}
这个网站 我写的规则他不显示下一页预览图 怎么搞