讨论 » Greasy Fork 反馈

BUG REPORT: Code uses an unapproved external script: https://unpkg.com/@trim21/gm-fetch

§
发表于:2022-12-13
编辑于:2022-12-13

I am using https://unpkg.com/@trim21/gm-fetch in my script, which for some reason is not allowed, even though unpkg is on the recognized CDNs list and I am able to use other scripts from the CDN.

I'm going to assume that it is because it starts with an @ and the regex matcher isn't able to deal with that? Could this be resolved?

JasonBarnabe管理员
§
发表于:2022-12-14

Everything on https://unpkg.com should be allowed; not sure why you'd receive this. URLs with resource integrity are also allowed, but I found a typo in the code. That bug is fixed now, but I'm not sure it'll fix your situation.

If it still doesn't work, please post the full script here in the forum and I'll test further.

§
发表于:2022-12-14

Everything on https://unpkg.com should be allowed; not sure why you'd receive this. URLs with resource integrity are also allowed, but I found a typo in the code. That bug is fixed now, but I'm not sure it'll fix your situation.If it still doesn't work, please post the full script here in the forum and I'll test further.

The error still persists. Other @require with resource integrity work just fine. You can find the source code right here and the actual finished script here.

JasonBarnabe管理员
§
发表于:2022-12-14

The problem is the ^. This is not a valid character in a URL. Browsers will fix it up for you, but really it should be encoded: https://unpkg.com/@trim21/gm-fetch@%5E0.1.12/dist/gm_fetch.js.

§
发表于:2022-12-14
编辑于:2022-12-14

Ooooh, of course. I normally make sure to use a fixed version, but I clearly messed it up this time around. 🤦‍♂️

This has fully fixed my issue. Thank you! Feel free to remove this issue (since I apparently can't).

JasonBarnabe管理员
§
发表于:2022-12-14

I've put in a change to make the error message clearer in this scenario.

发表回复

登录以发表回复。