From 06478d0c8a98eaeb1ddc431943634361ca251e75 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Fri, 24 Apr 2020 21:53:27 -0600 Subject: Make the Start header a link --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main.js') diff --git a/main.js b/main.js index 8bc647f..741e39c 100644 --- a/main.js +++ b/main.js @@ -70,7 +70,8 @@ function renderView(path, choice) { e.querySelector("a").href = path? `#/${path}/edit` : "#/edit"; e.querySelector("h2").innerHTML = path? (page.paths.length? `#${pageid} / ` + - page.paths.map(p => `${p}`).join(" / ") : "UNREACHABLE") : "Start"; + page.paths.map(p => `${p}`) + .join(" / ") : "UNREACHABLE") : "Start"; e.innerHTML += markup(page.body); if (!page.choices.length) e.innerHTML += "

"; else if (choice) e.innerHTML += `${markup(page.choices[choice-1][1])}`; @@ -89,7 +90,8 @@ function renderEdit(path) { e.classList.add("editing"); e.querySelector("a").href = `#/${path}`; e.querySelector("h2").innerHTML = path? (page.paths.length? `#${pageid} / ` + - page.paths.map(p => `${p}`).join(" / ") : "UNREACHABLE") : "Start"; + page.paths.map(p => `${p}`) + .join(" / ") : "UNREACHABLE") : "Start"; e.querySelector("textarea").value = page.body; page.choices.forEach(c => { -- cgit v1.2.3-70-g09d2