diff --git a/README.md b/README.md index fa4beef..1edb604 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,7 @@ Requires a token from https://tm.snekw.com/map or self hosted version of https:/ ### Advanced * Endpoint - Used if a self hosted version of SNWTM is used. Set to the URL to the API of the self hosted version. + +### Restore Web + +* Contains methods to retrieve the currently in use token to use to restore the web page if the web page token fails to restore automatically. diff --git a/build-op.bat b/build-op.bat index 28a9c72..3da17da 100644 --- a/build-op.bat +++ b/build-op.bat @@ -2,4 +2,9 @@ :: Set here your path to 7-Zip, including 7z.exe SET zip="C:\Program Files\7-Zip\7z.exe" + +IF EXIST SNWTMMap.op ( + del SNWTMMap.op +) + %zip% a -mx1 -tzip SNWTMMap.op info.toml src diff --git a/info.toml b/info.toml index 8c4fc88..2c8816c 100644 --- a/info.toml +++ b/info.toml @@ -2,7 +2,7 @@ name = "SNWTMMap" author = "Snekw" category = "Utilities" -version = "0.0.3" +version = "0.0.4" siteid = 187 [script] diff --git a/src/tmmap.as b/src/tmmap.as index fd4fce7..e6a8872 100644 --- a/src/tmmap.as +++ b/src/tmmap.as @@ -86,3 +86,16 @@ void Main(){ sleep(delay); } } + +[SettingsTab name="Restore Web"] +void RenderSettings(){ + UI::Text("Click the button below to retrieve the currently used token."); + UI::Text("This is useful if you need to restore the token on the web site."); + if(UI::Button("Copy Token to clipboard")){ + IO::SetClipboard(token); + print("Token copied to clipboard"); + } + if(UI::Button("Print Token to Log")){ + print("Token: " + token); + } +}