From d3c72f7738a126921a97248b0393e64fee8f12f2 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Mon, 20 Jul 2020 18:57:24 +0100 Subject: [PATCH] fix "back to image" button --- index.pug | 2 +- script.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.pug b/index.pug index 9922337..eafaf8e 100644 --- a/index.pug +++ b/index.pug @@ -59,7 +59,7 @@ html(lang="en-gb") to generate these alternate versions here. p. don't worry - #[i tilesy] will not create duplicate tiles. - button.pagination.prev previous + button.pagination.prev#back-to-image previous button.pagination.next#import next .page.download h2 download diff --git a/script.js b/script.js index b3d3f66..3a6080b 100644 --- a/script.js +++ b/script.js @@ -47,6 +47,7 @@ async function run() { await init(); const buttonAddImage = el("add"); + const buttonBackToImage = el("back-to-image"); const buttonDownload = el("download"); const buttonGameDataProceed = el("game-data-next"); const buttonImportGame = el("import"); @@ -150,6 +151,7 @@ async function run() { function addImage() { textareaGameDataInput.value = textareaGameDataOutput.value; textareaGameDataOutput.value = ""; + buttonBackToImage.click(); } buttonAddImage.addEventListener("click", addImage);