From b7f409440c89bf962b74e14e0605808c8c82aead Mon Sep 17 00:00:00 2001 From: DimK19 Date: Sat, 16 Sep 2023 09:50:10 +0300 Subject: [PATCH 1/3] Change position of click-to-copy confirmation message --- src/css/main.css | 18 +++++++++++++++--- src/index.template.html | 6 +++--- src/js/shared_controls.js | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/css/main.css b/src/css/main.css index 4e69d6c77..e73b8172a 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -180,21 +180,33 @@ th { font-weight: bold; font-size: 1.1em; margin: 0.5em 0; + position: relative; } .big-text #mainResult:hover { /* indicates the presence of click-to-copy function */ cursor: pointer; opacity: 0.7; } #tooltipText { + position: absolute; + left: 42%; + top: -170%; font-size: 0.8em; visibility: hidden; border-radius: 5px; - width: 120px; - background-color: black; + background-color: rgba(0, 0, 0, 0.7); color: white; text-align: center; padding: 5px; - margin-left: 10px; + font-weight: normal; +} +#tooltipText::after +{ + position: absolute; + left: 45%; + top: 100%; + content: ''; + border: 6px solid transparent; + border-top-color: rgba(0, 0, 0, 0.7); } .small-text { font-size: 0.8em; diff --git a/src/index.template.html b/src/index.template.html index 43cdae4fa..c2c478cff 100644 --- a/src/index.template.html +++ b/src/index.template.html @@ -132,9 +132,9 @@
-
- Loading... - Copied +
+ Loading... +
Copied
(If you see this message for more than a few seconds, try enabling JavaScript.)
diff --git a/src/js/shared_controls.js b/src/js/shared_controls.js index 3c82dbc40..785f785c1 100644 --- a/src/js/shared_controls.js +++ b/src/js/shared_controls.js @@ -1473,6 +1473,6 @@ $("#mainResult").click(function () { document.getElementById('tooltipText').style.visibility = 'visible'; setTimeout(function () { document.getElementById('tooltipText').style.visibility = 'hidden'; - }, 2000); + }, 1500); }); }); From b8e227e9aaffef258a019b26fa60d571c5561a4d Mon Sep 17 00:00:00 2001 From: DimK19 Date: Sat, 16 Sep 2023 10:03:34 +0300 Subject: [PATCH 2/3] Change duration of click-to-copy confirmation message in randoms mode --- src/js/index_randoms_controls.js | 2 +- src/randoms.template.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/index_randoms_controls.js b/src/js/index_randoms_controls.js index 70db65ab8..aaef5416c 100644 --- a/src/js/index_randoms_controls.js +++ b/src/js/index_randoms_controls.js @@ -205,6 +205,6 @@ $("#mainResult").click(function () { document.getElementById('tooltipText').style.visibility = 'visible'; setTimeout(function () { document.getElementById('tooltipText').style.visibility = 'hidden'; - }, 2000); + }, 1500); }); }); diff --git a/src/randoms.template.html b/src/randoms.template.html index 83d7cb1b9..353446da6 100644 --- a/src/randoms.template.html +++ b/src/randoms.template.html @@ -132,9 +132,9 @@
-
- Loading... - Copied +
+ Loading... +
Copied
(If you see this message for more than a few seconds, try enabling JavaScript.)
From f1a22b4fb585d1f75ec83216443a7e5f3c336a8d Mon Sep 17 00:00:00 2001 From: Waleed Hassan Date: Fri, 6 Oct 2023 14:01:37 +0300 Subject: [PATCH 3/3] nit --- src/css/main.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/css/main.css b/src/css/main.css index e73b8172a..f0219d9c0 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -199,8 +199,7 @@ th { padding: 5px; font-weight: normal; } -#tooltipText::after -{ +#tooltipText::after { position: absolute; left: 45%; top: 100%;