Greasy Fork is available in English.

Diskussionen » Entwicklung

Load a script from an external URL

Veröffentlicht: 30.01.2023

Am I allowed to load a script (library) from an external URL?

I am currently developing a scripting api, which I update regulary and push updates here and then. A lot of greasyfork scripts use this library, and its a pain when I have to update each script with the new library version. Is there anything that I can do?

Veröffentlicht: 31.01.2023

yes you are, specially because many other scripts already use that library according to you

Which library are you talking about? pls link it here

Veröffentlicht: 31.01.2023

Yes, you are allowed, but only if you follow going to follow this guide (Greasy Fork's libraries/external libraries' usage policy).

If you want to get the newest version of library from greasy fork, you can just not specify version search parameter, so URL will look like this:

This is not recommended, but if you always want latest version, you can do it.

Example user-script:

// ==UserScript==
// @name User Script
// @namespace -
// @version 1.0.0
// @description description
// @author You
// @match *://*/*
// @run-at document-body
// @license GPL-3.0-or-later
// @grant none
// @require
Veröffentlicht: 31.01.2023

I totally forgot about // ==/UserScript== at the end of user-script's meta values. Do not forget to put it at the end! :P

Antwort schreiben

Anmelden um eine Antwort zu senden.