summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-11-28 18:22:46 +0200
committerGitHub <noreply@github.com>2018-11-28 18:22:46 +0200
commitf17524bd0c8bc1b27760085d5afa6fc66ba208c6 (patch)
tree7bcb85d8de641509a7a0e7cc12fc14dcaf15a90c /public/js
parenteabbddcd98717ef20d8475e819f403c50f4a9787 (diff)
downloadgitea-f17524bd0c8bc1b27760085d5afa6fc66ba208c6.tar.gz
gitea-f17524bd0c8bc1b27760085d5afa6fc66ba208c6.zip
Fix heatmap colors for Chrome/Safari (#5421)
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 6952cec7f6..d65419f2ac 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2363,8 +2363,13 @@ function initHeatmap(appElementId, heatmapUser, locale) {
getColor: function(idx) {
var el = document.createElement('div');
el.className = 'heatmap-color-' + idx;
+ document.body.appendChild(el);
- return getComputedStyle(el).backgroundColor;
+ var color = getComputedStyle(el).backgroundColor;
+
+ document.body.removeChild(el);
+
+ return color;
}
},