0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00

Fix heatmap colors for Chrome/Safari (#5421)

This commit is contained in:
Lauris BH 2018-11-28 18:22:46 +02:00 committed by GitHub
parent eabbddcd98
commit f17524bd0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
},