Discussions » Greasy Fork'ის შეფასება

为何使用了SRI依然不允许加载外部脚本

§
Posted: 14.10.2022

按照 Greasy Fork 对外部脚本的政策

Scripts with subresource integrity hashes

Use of and with URLs with subresource integrity in the Tampermonkey format is allowed.@require@resource

使用SRI后应该允许引入外部脚本不是吗

§
Posted: 15.10.2022

You are allowed to do this. This message is telling you though that you have the wrong hashes, and the JS may not be loadable.

If you think this is an error please provide the URL of your script and I can investigate.

§
Posted: 15.10.2022

The problem is because you are using - after the hash method instead of the expected =. I'm not sure if TM allows both. I'll find that out and fix if necessary, but for now, you can get it to work with:

// @require https://github.com/lzghzr/TampermonkeyJS/raw/5fe14e0f8ac7ae8dd9a8fe8f8cbc58fe2d273112/bliveproxy/bliveproxy.js#sha256=QC/hfqL2rdtTK3GeK1ZUXDXmHU1xp42kC+ard3NKc9Q=
// @require https://github.com/lzghzr/TampermonkeyJS/raw/5fe14e0f8ac7ae8dd9a8fe8f8cbc58fe2d273112/ajax-proxy/ajax-proxy.js#sha256=gdnIAuKAoGbiVdPUVGp6xctZaZJlOwsdQ0o4LawIKzk= 
§
Posted: 21.05.2023

The problem is because you are using - after the hash method instead of the expected =. I'm not sure if TM allows both. I'll find that out and fix if necessary,

TM supports both formats Subresource Integrity

§
Posted: 24.05.2023

OK, I've updated Greasy Fork to be able to recognize both.

Post reply

Sign in to post a reply.