From ab629c52a1aeb09e0f3d2689580f28b2bfe34a85 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 28 Dec 2019 19:08:07 +0200 Subject: [PATCH] Replace padStart with a solution that works in older browsers Signed-off-by: Adam Warner --- scripts/pi-hole/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 969e6cdc..da679d6c 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -323,7 +323,7 @@ function updateClientsOverTime() { // If we ran out of colors, make a random one backgroundColor: i < colors.length ? colors[i] : - "#" + parseInt(String(Math.random() * 0xFFFFFF), 10).toString(16).padStart(6, "0"), + "#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6), pointRadius: 0, pointHitRadius: 5, pointHoverRadius: 5,