From 1b613f497e993b6ef33dfe3d7aa14416d7cdaa23 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 22 May 2024 08:33:21 +0100 Subject: [PATCH] Add '(link)' text to readme window, so users can easily share a link to the readme --- js/index.js | 3 ++- js/ui.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/index.js b/js/index.js index 1ec00cc..04d80b3 100644 --- a/js/index.js +++ b/js/index.js @@ -205,7 +205,8 @@ function showReadme(event, appid) { let markedOptions = { baseUrl : appPath }; function show(contents) { if (!contents) return; - showPrompt(app.name + " Documentation", marked(contents, markedOptions), {ok: true}, false).catch(() => {}); + let footerText = `(Link)`; + showPrompt(app.name + " Documentation", marked(contents, markedOptions), {ok: true, footer: footerText}, false).catch(() => {}); } httpGet(appPath+app.readme).then(show).catch(()=>show("Failed to load README.")); } diff --git a/js/ui.js b/js/ui.js index b75da5a..0304664 100644 --- a/js/ui.js +++ b/js/ui.js @@ -117,13 +117,14 @@ function showPrompt(title, text, buttons, shouldEscapeHtml) { ${(shouldEscapeHtml) ? escapeHtml(text).replace(/\n/g,'
') : text} - ${Object.keys(buttons).length ? ``:``} + `:``} `); document.body.append(modal);