From 9c00932e504bae56ed01582c2babd9ebc72d3529 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sat, 30 Dec 2017 01:09:10 +0100 Subject: [PATCH] Improve race infobox a bit --- js/util.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/util.js b/js/util.js index 2e8e435..e62fb32 100644 --- a/js/util.js +++ b/js/util.js @@ -150,12 +150,16 @@ function getImageFromWikipedia(data,pageName,imagesize,callback){ function renderRaceInfoBox(race) { var raceInfo = race.raceInfo; + var circuit = preprocessor.getResults().circuits[raceInfo.circuitId]; //console.log(raceInfo); var content = ""; content = "

"+raceInfo.name+"

"; - content += "
"+raceInfo.date.toLocaleDateString("de-DE")+"
"; - content += "See on Wikipedia"; - + content += "
"+circuit.name+" ("+circuit.location+", "+circuit.country+")
"; + content += "
"+raceInfo.date.toLocaleDateString("de-DE")+"
" + content += "
"; + content += "See Race on Wikipedia "; + content += "See Circuit on Wikipedia"; + content += "
"; return content; }