Greasy Fork is available in English.
⭐无缝加载 下一页内容 至网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、B 站(bilibili)、NGA、V2EX、煎蛋网、龙的天空、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、动漫屋、漫画猫、漫画屋、漫画 DB、动漫之家、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
作者的規則說明需要詳細閱讀過
https://github.com/XIU2/UserScript/issues/176
最基本的至少要會寫CSS選擇器
以chrome瀏覽器為例,按F12或Ctrl+Shift+I或由右上選單>更多工具>開發人員工具,試著學習使用開發人員工具,按開發人員工具左上的箭頭或快捷鍵Ctrl+Shift+C,可以選取頁面元素,用來查看下一頁元素和主體元素。
最簡單的方式是選擇元素後按滑鼠右鍵>複製>複製selector,就能產生css選擇器,然後填入nextL、pageE、replaceE,不過這樣CSS選擇器可能會很長。
簡單說明舉例下一頁元素
a標籤 屬性id="next" 屬性class="next"
css這樣寫
a#next.next,屬性id用#表示,屬性class用.表示。
也能這樣寫
a[id='next'][class='next']
格式:標籤名[標籤屬性1='值'][標籤屬性2='值']
XPath這樣寫
//a[@id='next'][@class='next']
開發人員工具>元素,按Ctrl+F就能練習寫選擇器。
"www.shein.tw": { "host": "www.shein.tw", "url": "if(fun.getCSS('.sui-pagination')){if(location.href.indexOf('page=')==-1)fun.getCSS('.sui-pagination span[aria-current]').click();return true}", "pager": { "nextL": "js; return fun.getNextUP('page=', /page=\\d+/)", "pageE": ".product-list>.S-product-item", "scrollE": ".sui-pagination" }, "function": { "bF": "return fun.src_bF(pageE)" } }, "www.zaful.com": { "host": "www.zaful.com", "url": "return fun.getCSS('.page-wrap.js_page_num')", "pager": { "nextL": "//a[not(@class='disabled') and i[@class='next']]", "pageE": "#js_proList .js_proList_item", "replaceE": ".page-wrap.js_page_num" }, "function": { "bF": "return fun.src_bF(pageE, [0,'img[data-original]','data-original'])" } }, "www.rihoas.com": { "host": "www.rihoas.com", "url": "return fun.getCSS('.pagination')", "pager": { "nextL": ".pagination>a.next", "pageE": ".collection-listing .product-block", "replaceE": ".pagination" }, "function": { "bF": "pageE.forEach(e=>{e.className='product-block cc-animate-init -in cc-animate-complete'});return pageE" } }, "www.temu.com": { "host": "www.temu.com", "url": "return fun.getCSS('[class^=loadMoreWrap]')", "pager": { "type": 2, "nextL": "[class^=loadMoreWrap]>[class^=wrap]" } }
特别感谢
作者的規則說明需要詳細閱讀過
https://github.com/XIU2/UserScript/issues/176
最基本的至少要會寫CSS選擇器
以chrome瀏覽器為例,按F12或Ctrl+Shift+I或由右上選單>更多工具>開發人員工具,試著學習使用開發人員工具,按開發人員工具左上的箭頭或快捷鍵Ctrl+Shift+C,可以選取頁面元素,用來查看下一頁元素和主體元素。
最簡單的方式是選擇元素後按滑鼠右鍵>複製>複製selector,就能產生css選擇器,然後填入nextL、pageE、replaceE,不過這樣CSS選擇器可能會很長。
簡單說明舉例下一頁元素
a標籤 屬性id="next" 屬性class="next"
css這樣寫
a#next.next,屬性id用#表示,屬性class用.表示。
也能這樣寫
a[id='next'][class='next']
格式:標籤名[標籤屬性1='值'][標籤屬性2='值']
XPath這樣寫
//a[@id='next'][@class='next']
開發人員工具>元素,按Ctrl+F就能練習寫選擇器。"www.shein.tw": { "host": "www.shein.tw", "url": "if(fun.getCSS('.sui-pagination')){if(location.href.indexOf('page=')==-1)fun.getCSS('.sui-pagination span[aria-current]').click();return true}", "pager": { "nextL": "js; return fun.getNextUP('page=', /page=\\d+/)", "pageE": ".product-list>.S-product-item", "scrollE": ".sui-pagination" }, "function": { "bF": "return fun.src_bF(pageE)" } }, "www.zaful.com": { "host": "www.zaful.com", "url": "return fun.getCSS('.page-wrap.js_page_num')", "pager": { "nextL": "//a[not(@class='disabled') and i[@class='next']]", "pageE": "#js_proList .js_proList_item", "replaceE": ".page-wrap.js_page_num" }, "function": { "bF": "return fun.src_bF(pageE, [0,'img[data-original]','data-original'])" } }, "www.rihoas.com": { "host": "www.rihoas.com", "url": "return fun.getCSS('.pagination')", "pager": { "nextL": ".pagination>a.next", "pageE": ".collection-listing .product-block", "replaceE": ".pagination" }, "function": { "bF": "pageE.forEach(e=>{e.className='product-block cc-animate-init -in cc-animate-complete'});return pageE" } }, "www.temu.com": { "host": "www.temu.com", "url": "return fun.getCSS('[class^=loadMoreWrap]')", "pager": { "type": 2, "nextL": "[class^=loadMoreWrap]>[class^=wrap]" } }
注意完整格式要正确
{ 在花括号中间粘贴我提供的规则 }
如果已经有其他自定义规则,中间的规则花括号之间是要用,做区隔的。
{ "规则1":{ }, "规则2":{ } }
注意完整格式要正确
{ 在花括号中间粘贴我提供的规则 }如果已经有其他自定义规则,中间的规则花括号之间是要用,做区隔的。
{ "规则1":{ }, "规则2":{ } }
非常感谢
申请一下,www.shein.com https://www.zaful.com/ https://www.rihoas.com/ https://www.temu.com/
感谢作者,该脚本非常实用。
可以麻烦作者出一期怎么自定义网页的视频教程吗,文字的对于我们没有基础的人看了很迷糊