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) {