From 6bf13c405463b3bbd8d36ed05af5fe33735540aa Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 23 Feb 2022 14:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=BF=BB=E9=A1=B5=E8=A7=84=E5=88=99]=20=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index d2acd33..3d6a691 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -7765,7 +7765,7 @@ function: { if (getCSS('#Autopage_customRules')) return // 插入网页 - let _html = `
+ let _html = `

自定义翻页规则(优先于脚本内置规则)

「 点击展开 查看示例 」(把常用规则都放在一起了,方便需要的时候可复制一份修改使用) @@ -7775,7 +7775,7 @@ function: {
  • 该功能只适用于简单的网站,当然这类网站占大多数,我写的数百规则里大部分都是这类网站。
  • 脚本会自动格式化规则,因此无需手动缩进、换行。
  • -

    注意:不要完全照搬脚本内置规则,因为和标准 JSON 格式等有所差别。

    +

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

     "aaa": {
         "host": "aaa",
    @@ -7816,7 +7816,7 @@ function: {
     
     
    ` document.documentElement.insertAdjacentHTML('beforeend', _html); - document.body.style.overflow = 'hidden'; + document.documentElement.style.overflow = document.body.style.overflow = 'hidden'; // 点击事件 getCSS('#Autopage_customRules_save').onclick = function () { let rules = getCSS('#Autopage_customRules_textarea').value; @@ -7832,7 +7832,7 @@ function: { window.alert('自定义规则存在格式错误:\n' + e + '\n\n注意事项:\n规则中冒号 : 左右的内容都需要加上双引号 " 而不能用单引号 \',如果内容中含有双引号则需要对双引号转义(即 \" 这样)或者改用单引号'); } } - getCSS('#Autopage_customRules_cancel').onclick = function () {document.body.style.overflow = ''; getCSS('#Autopage_customRules').remove();} + getCSS('#Autopage_customRules_cancel').onclick = function () {document.documentElement.style.overflow = document.body.style.overflow = ''; getCSS('#Autopage_customRules').remove();} } // 显示页码 function pageNumber(type) {