From 82edc02dbf4d7c06913e6144172bd9cb3b6d3bdd Mon Sep 17 00:00:00 2001 From: TrapjawwS <145371179+TrapjawwS@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:08:11 +0000 Subject: [PATCH] test --- index.html | 10 +++++++++- script.js | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 5bfc74e..4d45f69 100644 --- a/index.html +++ b/index.html @@ -54,9 +54,14 @@ EJS_core = "gba"; if (HMR3_optionValue == "customlink") { + var gametitle = prompt("What is the title of the game?") var customurl = prompt("Enter your url. (If you don't know how to get the url, upload your rom to github, copy the url for the raw file, and put it through githack)") HMR3_optionValue = customurl - + HMR3_cachedtitles.push(gametitle); + HMR3_cachedlinks.push(customurl); + localStorage.setItem("HMR3_cachedtitles", string) + localStorage.setItem("HMR3_cachedlinks", string) + alert("Ok cool. Next time you open this file, the game you added should be saved and in the dropdown! Enjoy :)") } if (HMR3_optionValue == "moreroms") { @@ -248,6 +253,9 @@ //function HMR3_writeOptions(){ var HMR3_dropdownString = ""; + HMR3_optionText = HMR3_optionText.concat(HMR3_cachedtitles) + HMR3_optionValue = HMR3_optionValue.concat(HMR3_cachedlinks) + for (i=0;i" + HMR3_optionText[i] + ""; } diff --git a/script.js b/script.js index 29b4684..4c6c9e9 100644 --- a/script.js +++ b/script.js @@ -825,3 +825,11 @@ var HMR3_SNES = [ var HMR3_SEGAMS = [ ] + +var HMR3_cachedtitles = [ + +] + +var HMR3_cachedlinks = [ + +]