Greasy Fork is available in English.

讨论 » Greasy Fork 反馈

Can GF hosted libraries be minified?

§
发表于:2023-09-02

On code-rules it says:

Code posted to Greasy Fork must not be obfuscated or minified.

On external-scripts it says:

Code from CDNs is allowed. See a list of recognized CDNs. This code may be minified, but not obfuscated.

And GF is listed as a recognized CDN.

Since GF is listed in both, I'm a little confused. Is there any clarification anywhere?

Thanks,
mrc

NotYou管理员
§
发表于:2023-09-02

Actually, you are right, there is confusion created by these rules. Foremost, yes, code rules apply to libraries posted at Greasy Fork, so you can't upload a minified library at Greasy Fork (as well as obfuscated code). And also, you can upload a script which uses minified library from list of recognized CDNs, but there is a thing, you can't use minified library uploaded Greasy Fork because of previous rule:

Code posted to Greasy Fork must not be obfuscated or minified.

So, therefore, code rules are more prioritized than external script rules. I'm not exactly sure, but that's how I understood it, you can wait for the answer of Jason (administrator) if you want to.

§
发表于:2023-09-02

That was my understanding as well. However, I was just looking through some libraries, and many of them are minified. Thus, confusion.

NotYou管理员
§
发表于:2023-09-02

That was my understanding as well. However, I was just looking through some libraries, and many of them are minified. Thus, confusion.

Oh, I rarely look into the libraries, so many of them are not moderated well. If you see a minified library, you can report it to help the community of Greasy Fork. That will prevent existence of scripts with minified code that may contain malware. Reporting these libraries (And scripts as well) could prevent you and many other users of being infected by malware.

§
发表于:2023-09-02

I agree. I just wanted an official statement before doing so. :->

JasonBarnabe管理员
§
发表于:2023-09-04

You cannot post minified code to Greasy Fork, even as libraries.

Generally you don't want to use Greasy Fork as a CDN, but the option is there for some special situations.

发表回复

登录以发表回复。