AutoPager

Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page)~

< Feedback on AutoPager

Review: Good - script works

§
Posted: 2022-09-12

github issues 页面 貌似执行策略被限制了,

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src github.githubassets.com".

现在我修改为如下是可用的

  "Github - Issues": {
    "host": "github.com",
    "url": "/\\/\\w+\\/\\w+\\/issues/",
    "pager": {
      "nextL": "a.next_page",
      "pageE": "div[id^='issue_'], ul[aria-labelledby='discussions-list']>li, #repo-content-pjax-container>div>div[data-pjax]>div:not(.paginate-container), div[id^='check_suite_']",
      "replaceE": ".pagination",
      "scrollD": 2500
    }
  }
X.I.UAuthor
§
Posted: 2022-09-12

你这个报错和该油猴脚本无关。

我这边测试 Github Issues 翻页一切正常。

另外,该条规则里的 pageE 只有 div[id^='issue_'] 才是 Issues 的,后面一大堆 CSS 选择器是其他页面的(Discussions、Releases、Actions),我是为了精简规则将一些差不多的样式合并到一起了。

§
Posted: 2022-09-13

你的浏览器是不是旧版?试试最新的谷歌浏览器 我debug看过了 确实是执行策略的问题

§
Posted: 2022-09-13

当匹配到这条规则时就已经报错了

"Github": {
        "host": "github.com",
        "url": "fun.isUrlC(); return (fun.lp() == '/')",
        "pager": {
            "type": 2,
            "nextL": ".ajax-pagination-btn"
        }
    },

建议还是都改成正则匹配会比较合适

X.I.UAuthor
§
Posted: 2022-09-13
Edited: 2022-09-13

我使用 Microsoft Edge Chromium 版本 105.0.1343.33 (正式版本) (64 位) 没有任何问题。

这条规则也没有任何问题,和是否使用正则无关。

请检查你的浏览器、扩展。

§
Posted: 2022-09-13

是字符串转函数的原因,我edge和谷歌都是报这个错,我贴个图吧

X.I.UAuthor
§
Posted: 2022-09-13
Edited: 2022-09-13

我的 Edge 没有任何报错。

你尝试彻底删除脚本,重新安装试试。

§
Posted: 2022-09-13

找到问题了,换油猴是可用的,我前面用的暴力猴,我去对应插件反馈问题吧,打扰了

§
Posted: 2022-09-25

666

Post reply

Sign in to post a reply.