From 41a64965a7560719382dd73db3b0448edab694ab Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 15 Sep 2019 17:15:41 +0100 Subject: [PATCH] remove hardcoded email address --- public/src/js/about.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/src/js/about.js b/public/src/js/about.js index 104d8a1..ad571ba 100644 --- a/public/src/js/about.js +++ b/public/src/js/about.js @@ -31,7 +31,16 @@ var versionUrl = gameConfig._version.url this.getLink(this.linkIssues).href = versionUrl + "issues" - + + var contactEmail = gameConfig.email + if (typeof contactEmail === 'string') { + this.linkEmail.setAttribute("alt", contactEmail) + this.getLink(this.linkEmail).href = "mailto:" + contactEmail + this.getLink(this.linkEmail).text = contactEmail + } else { + this.linkEmail.style.display = "none" + } + pageEvents.add(this.linkIssues, ["click", "touchend"], this.linkButton.bind(this)) pageEvents.add(this.linkEmail, ["click", "touchend"], this.linkButton.bind(this)) pageEvents.add(this.endButton, ["mousedown", "touchstart"], this.onEnd.bind(this))