diff --git a/Autopage.user.js b/Autopage.user.js index 3d67c6b..8772551 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -7814,7 +7814,7 @@ function: { let _html = `

自定义翻页规则(优先于脚本内置规则)-【把规则插入默认的 { } 中间】

-「 点击展开 查看示例 」(把常用规则都放在一起了,方便需要的时候可复制一份修改使用) +「 点击展开 查看示例 」(我把常用规则都塞进去了,方便需要的时候可复制一份修改/删减后使用)

注意:不要完全照搬脚本内置规则,因为和标准 JSON 格式等有所差别,具体请参考下面示例。

-"aaa": {
-    "host": "aaa",
-    "url": "/^\\/s$/",
-    "style": ".aaaa {display: none !important;}",
-    "pager": {
-        "type": 1,
-        "nextL": "id('page')//a[contains(text(),'下一页')]",
-        "pageE": "css;aaa",
-        "insertP": ["css;.bbb", 3],
-        "replaceE": "css;.page",
-        "scriptT": 2,
-        "interval": 500,
-        "scrollD": 1500
+// 大多数网站的规则一般都只需要像第一个 "aaa" 这样的(不要连带复制这行注释说明):
+{
+    "aaa": {
+        "host": "aaa.com",
+        "url": "/xxx/",
+        "pager": {
+            "nextL": "css;xxx",
+            "pageE": "css;xxx",
+            "replaceE": "css;xxx",
+            "scrollD": 1000
+        }
     },
-    "function": {
-        "bF": "src_bF",
-        "bFp": [0, "img[data-src]", "data-src"],
-        "aF": "document.body.appendChild(document.createElement('script')).textContent = 'xxx'"
-    }
-},
-"bbb": {
-    "host": "/\.bbb\.com/",
-    "url": "if (location.pathname.indexOf('/s') > -1) {return true;}",
-    "pager": {
-        "type": 2,
-        "nextL": "css;#autopbn",
-        "nextText": "下一页",
-        "nextTextOf": "下一页",
-        "interval": 1000,
-        "scrollD": 1500
+    "bbb": {
+        "host": ["bbb1.com", "bbb2.com"],
+        "url": "/^\\/s$/",
+        "style": ".aaaa {display: none !important;}",
+        "pager": {
+            "type": 1,
+            "nextL": "id('page')//a[contains(text(),'下一页') or text()='下一页']",
+            "pageE": "css;aaa",
+            "insertP": ["css;.bbb",3],
+            "replaceE": "css;.page",
+            "scriptT": 1,
+            "interval": 500,
+            "scrollD": 1500
+        },
+        "function": {
+            "bF": "src_bF",
+            "bFp": [0,"img[data-src]","data-src"],
+            "aF": "document.body.appendChild(document.createElement('script')).textContent = 'xxx'"
+        }
+    },
+    "ccc": {
+        "host": "/\\.ccc\\.com/",
+        "url": "if (location.pathname.indexOf('/s') > -1) {return true;}",
+        "pager": {
+            "type": 2,
+            "nextL": "css;#autopbn",
+            "nextText": "下一页",
+            "nextTextOf": "下一页",
+            "interval": 1000,
+            "scrollD": 1500
+        }
     }
 }