東方永頁機

Webページを自動で読み込み継ぎ足し表示を行うブラウザ拡張です、次のページ付けされた Web ページの自動読み込みと現在のページへの挿入 ルールなしで何千もの Web サイトをサポートします。

< 東方永頁機についてのフィードバック

レート:良 – スクリプトは良好に動作する

§
投稿日: 2022/04/03

Love this script.
I tried following your custom rules guide and used one of your examples to see if I could make a rule for gog.com
I'm more interested in learning how to make one than one being made. Does this look correct

[
{
"name":"gog",
"action":1,
"url":"^https://www\\.gog\\.com/",
"pageElement":"paginated-products-grid.ng-star-inserted",
"nextLinkByUrl":["(.*/)(\\d+)$","$1{$2+1}"],
"pageAction":"[].forEach.call(eles[0].querySelectorAll('[loading=lazy]'),img=>
},
]

I know we need to inspect page to see element and tried looking for the element around the titles.
I really wish there there was some better info on creating rules maybe even a video

anyhow great work and appreciate your help

hoothin作者
§
投稿日: 2022/04/04

Try this :)

  {
    "name":"gog",
    "action":1,
    "url":"^https://www\\.gog\\.com/",
    "pageElement":"paginated-products-grid.ng-star-inserted",
    "nextLinkByUrl":["(.*=)(\\d+)$","$1{$2+1}"],
    "pageAction":"[].forEach.call(eles, ele=>{[].forEach.call(ele.querySelectorAll('source[lazyload]'), source=>{source.setAttribute('srcset',source.getAttribute('lazyload'))})})"
  }

First of all, you should correct the regexp for url from "(.*/)(\\d+)$" to "(.*=)(\\d+)$".
Then you'll use pageAction to change real srcset with the attribute "lazyload".

返信を投稿

返信を投稿するにはログインしてください。