diff --git a/js/reiseauskunft.js b/js/reiseauskunft.js index 156c0ea..4a564a3 100644 --- a/js/reiseauskunft.js +++ b/js/reiseauskunft.js @@ -92,6 +92,18 @@ function domCreateButton(href, image_src) { */ function domCreateButtonMarudor(path) { var button = domCreateButton("https://marudor.de" + path, getMediaURL("marudor.svg")); + button.setAttribute("title", "marudor.de"); + return button; +} + +/** + * Returns an 'image buttom' to specifically link to dbf.finalrewind.org + * + * @param path URL path part after https://dbf.finalrewind.org + */ +function domCreateButtonDbf(path) { + var button = domCreateButton("https://dbf.finalrewind.org" + path, getMediaURL("dbf.png")); + button.setAttribute("title", "dbf.finalrewind.org"); return button; } @@ -239,12 +251,18 @@ var connection_result_observer = new MutationObserver((mutations) => { var marudor_button = domCreateButtonMarudor("/" + data[i]["from"]["station"]); bahn_insight_field.appendChild(marudor_button); + var dbf_button = domCreateButtonDbf("/" + data[i]["from"]["station"]); + bahn_insight_field.appendChild(dbf_button); + var to = relationend.querySelector("td.station"); var bahn_insight_field = domCreateBahnInsightField(); to.appendChild(bahn_insight_field); var marudor_button = domCreateButtonMarudor("/" + data[i]["to"]["station"]); bahn_insight_field.appendChild(marudor_button); + + var dbf_button = domCreateButtonDbf("/" + data[i]["to"]["station"]); + bahn_insight_field.appendChild(dbf_button); }); log("ui injected"); diff --git a/media/dbf.png b/media/dbf.png new file mode 100644 index 0000000..30c3b1d Binary files /dev/null and b/media/dbf.png differ