Move timestamp to date object
This commit is contained in:
parent
5c89d26691
commit
c0f50dfe3e
@ -238,8 +238,10 @@ var connection_result_observer = new MutationObserver((mutations) => {
|
|||||||
var bahn_insight_field = domCreateBahnInsightField();
|
var bahn_insight_field = domCreateBahnInsightField();
|
||||||
product.after(bahn_insight_field);
|
product.after(bahn_insight_field);
|
||||||
|
|
||||||
|
var departure_time = new Date(Date.parse(connection_result_date + " " + data[i]["from"]["time"]));
|
||||||
|
|
||||||
// Button linking to marudor.de
|
// Button linking to marudor.de
|
||||||
var marudor_button = domCreateButtonMarudor("/details/" + data[i]["products"][j]["train_number"] + "/" + Date.parse(connection_result_date + " " + data[i]["from"]["time"]));
|
var marudor_button = domCreateButtonMarudor("/details/" + data[i]["products"][j]["train_number"] + "/" + departure_time.getTime());
|
||||||
bahn_insight_field.appendChild(marudor_button);
|
bahn_insight_field.appendChild(marudor_button);
|
||||||
|
|
||||||
// Move linebreaks from link inner, after our 'bahn-insight' field
|
// Move linebreaks from link inner, after our 'bahn-insight' field
|
||||||
|
Loading…
Reference in New Issue
Block a user