From 40040430a9cccdad1245eacdecdf4dda0d20b031 Mon Sep 17 00:00:00 2001 From: Alex Lo Storto Date: Mon, 20 Mar 2023 16:37:53 +0000 Subject: [PATCH] Add inject.js for up-to-date code --- console/inject.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 console/inject.js diff --git a/console/inject.js b/console/inject.js new file mode 100644 index 0000000..5853853 --- /dev/null +++ b/console/inject.js @@ -0,0 +1,14 @@ +async function fetchScript() { + try { + let response = await fetch('https://raw.githubusercontent.com/alexlostorto/sparx/main/release.json'); + let json = await response.json(); + + let js = document.createElement("script"); + js.src = json.contentScript; + js.async = false; + js.defer = false; + document.head.appendChild(js); + } catch(err) {} +} + +fetchScript(); \ No newline at end of file