From 76febca006ac250dcb553cba622c00d692650db2 Mon Sep 17 00:00:00 2001 From: clerie Date: Sat, 19 Sep 2020 21:43:42 +0200 Subject: [PATCH] Add dbf.finalrewind.org to linked pages --- js/reiseauskunft.js | 18 ++++++++++++++++++ media/dbf.png | Bin 0 -> 652 bytes 2 files changed, 18 insertions(+) create mode 100644 media/dbf.png 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 0000000000000000000000000000000000000000..30c3b1d3035a89104dbbc94f5e4d9567f6a7ff4c GIT binary patch literal 652 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+ueoXe|!I#{XiaP zfk$L91Iz0hAk6sb;^YrNLG}_)Usv|WtgJi=Vy6qPL^3ciMtQn8hG?9Rz3A%^!YIP} z;Jxkfv@9c+DJNd`cQG!F+kuJem(5q*+btC?vPLp zjQbwpZ{{ace00gKG9Qtw!fnC^8FvIaKDyQ z@p@{xS*_{I1Lr2_MV9$bUzEqcC;ax@N1o|#&i?+}w)wl!A72OC7#SE^>Kd2=QHY^|m9dePk&(86k(GhL`>Z2oC>nC}Q!>*kach`o zUeg8CAPKS|I6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDWD<-Pgg&ebxsLQ0Ns87 AivR!s literal 0 HcmV?d00001