From 09a3235574e1834378a965fe30707b0428e4c8f6 Mon Sep 17 00:00:00 2001 From: LoveEevee Date: Sat, 13 Oct 2018 02:52:21 +0300 Subject: [PATCH] Hide version link url from status bar --- public/src/css/main.css | 7 +++++-- public/src/js/loader.js | 5 +++++ templates/index.html | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/public/src/css/main.css b/public/src/css/main.css index f807b79..b91867a 100644 --- a/public/src/css/main.css +++ b/public/src/css/main.css @@ -236,11 +236,14 @@ kbd{ opacity: 0.7; font-family: TnT, Meiryo, sans-serif; } +#version:hover{ + opacity: 1; +} -#version a { +#version-link{ color: #FFFFFF; text-decoration: none; - cursor: default; + pointer-events: none; } .version-hide{ diff --git a/public/src/js/loader.js b/public/src/js/loader.js index 3461e9a..e8bda9d 100644 --- a/public/src/js/loader.js +++ b/public/src/js/loader.js @@ -10,6 +10,11 @@ class Loader{ pageEvents.add(root, ["touchstart", "touchmove", "touchend"], event => { event.preventDefault() }) + var versionDiv = document.getElementById("version") + var versionLink = document.getElementById("version-link") + pageEvents.add(versionDiv, ["click", "touchend"], () => { + versionLink.click() + }) } run(page){ this.promises = [] diff --git a/templates/index.html b/templates/index.html index ddb810d..d813baf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -59,9 +59,9 @@
{% if version %} - taiko-web ver.{{version.version}} ({{version.commit_short}}) + taiko-web ver.{{version.version}} ({{version.commit_short}}) {% else %} - taiko-web (unknown version) + taiko-web (unknown version) {% endif %}