mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	Fix heatmap colors for Chrome/Safari (#5421)
This commit is contained in:
		@@ -2363,8 +2363,13 @@ function initHeatmap(appElementId, heatmapUser, locale) {
 | 
				
			|||||||
            getColor: function(idx) {
 | 
					            getColor: function(idx) {
 | 
				
			||||||
                var el = document.createElement('div');
 | 
					                var el = document.createElement('div');
 | 
				
			||||||
                el.className = 'heatmap-color-' + idx;
 | 
					                el.className = 'heatmap-color-' + idx;
 | 
				
			||||||
 | 
					                document.body.appendChild(el);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                return getComputedStyle(el).backgroundColor;
 | 
					                var color = getComputedStyle(el).backgroundColor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                document.body.removeChild(el);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return color;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user