From caa802f3b0f70faccef0101053ada7a4666fab3d Mon Sep 17 00:00:00 2001
From: Couleur <82747632+couleurm@users.noreply.github.com>
Date: Fri, 29 Mar 2024 17:14:46 +0100
Subject: [PATCH] use remote Manifests.json instead of local file
---
index.html | 29 +++++++++++----
init.js | 103 -----------------------------------------------------
2 files changed, 23 insertions(+), 109 deletions(-)
delete mode 100644 init.js
diff --git a/index.html b/index.html
index dede87f..8519dba 100644
--- a/index.html
+++ b/index.html
@@ -30,12 +30,11 @@
-
-
@@ -84,9 +83,27 @@
Parameters
>reset conf
+
+ let tlui = {};
+ const fetch_error = "Failed fetching the latest version of the TweakList manifest\n\nPlease open the console report this:\n\nhttps://github.com/couleur-tweak-tips/TweakList"
+
+ fetch('https://raw.githubusercontent.com/couleur-tweak-tips/TweakList/master/Manifests.json')
+ .catch(error => {
+ alert(fetch_error)
+ console.log(fetch_error)
+ })
+ .then(response => {
+ if (!response.ok) {
+ throw new Error(fetch_error);
+ }
+ return response.json();
+ })
+ .then(data => {
+ tlui = data
+ loadList(tlui);
+ })
+