[JS]AutoUpdate (The most complicated way? xd)
-
Complicated AutoUpdate
- check if update required
- download update using raw (on enable rn)
- thats it its just hella ugly in code
idk if its the best way to check if an update is needed but i used
localeCompare()
What should you do? Use Core to avoid ugly and long code like mine!
-
-
@suicidemouse33 idk its in every script i make
-
@faaatpotato why though
-
@faaatpotato said in [JS]AutoUpdate (The most complicated way? xd):
idk its in every script i make
-
@faaatpotato i meant like why are you putting that in the script's description
-
-
FaaatPotatoreplied to FaaatPotato on 6 Jul 2022, 21:34 last edited by FaaatPotato 7 Jun 2022, 23:35
Update:
- Now added how to check for an version-change instead of an entire script-change
- its way easier to use now ig
-
CzechHekreplied to FaaatPotato on 6 Jul 2022, 23:00 last edited by CzechHek 7 Jul 2022, 01:01
The simplest way
///api_version=2 (script = registerScript({ name: "ScriptThatAutoUpdates", authors: ["CzechHek"], version: "1" })).import("Core.lib"); Core.updateURL = "raw script url" //such as https://raw.githubusercontent.com/CzechHek/Core/master/Scripts/InventoryManager.js //if a script is in Core's repo, it gets checked automatically without the need of updateURL property //if updateURL == false ("" / false / NaN / ...) then autoupdating is disabled
-
This post is deleted!
1/11