Discussions » Greasy Fork'ის შეფასება
为何使用了SRI依然不允许加载外部脚本
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.
// @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=
谢谢
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=
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
OK, I've updated Greasy Fork to be able to recognize both.
按照 Greasy Fork 对外部脚本的政策
Scripts with subresource integrity hashes
Use of and with URLs with subresource integrity in the Tampermonkey format is allowed.
@require@resource
使用SRI后应该允许引入外部脚本不是吗