Compare commits
No commits in common. "0d16660d97cec5be1b2c84e0b647e3db3232f312" and "6c9bd60235e9d131be1a7e03b0bfccf738898982" have entirely different histories.
0d16660d97
...
6c9bd60235
@ -44,14 +44,8 @@ function domCreateImage(src) {
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
function domCreateLinebreak() {
|
|
||||||
var linebreak = document.createElement("br");
|
|
||||||
return linebreak;
|
|
||||||
}
|
|
||||||
|
|
||||||
function domCreateButton(href, image_src) {
|
function domCreateButton(href, image_src) {
|
||||||
var link = domCreateLink(href);
|
var link = domCreateLink(href);
|
||||||
link.setAttribute("target", "_blank");
|
|
||||||
var image = domCreateImage(image_src);
|
var image = domCreateImage(image_src);
|
||||||
image.setAttribute("style", "height: 2em; vertical-align:middle;")
|
image.setAttribute("style", "height: 2em; vertical-align:middle;")
|
||||||
link.append(image);
|
link.append(image);
|
||||||
@ -78,17 +72,6 @@ var connection_result_observer = new MutationObserver((mutations) => {
|
|||||||
if(typeof train_name_text !== 'undefined') {
|
if(typeof train_name_text !== 'undefined') {
|
||||||
var marudor_button = domCreateButtonMarudor("/details/" + train_name_text);
|
var marudor_button = domCreateButtonMarudor("/details/" + train_name_text);
|
||||||
train_name.after(marudor_button);
|
train_name.after(marudor_button);
|
||||||
|
|
||||||
// Move linebreaks from link inner, after our button
|
|
||||||
linebreaks = train_name.querySelectorAll("br");
|
|
||||||
if(linebreaks.length != 0) {
|
|
||||||
linebreaks.forEach((linebreak) => {
|
|
||||||
train_name.removeChild(linebreak);
|
|
||||||
});
|
|
||||||
|
|
||||||
marudor_button.after(domCreateLinebreak());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Bahn Insight",
|
"name": "Bahn Insight",
|
||||||
"version": "0.5",
|
"version": "0.4",
|
||||||
|
|
||||||
"description": "Extends the booking portal of bahn.de with linking to useful information.",
|
"description": "Extends the booking portal of bahn.de with linking to useful information.",
|
||||||
"homepage_url": "https://git.clerie.de/clerie/bahn-insight/",
|
"homepage_url": "https://git.clerie.de/clerie/bahn-insight/",
|
||||||
|
Loading…
Reference in New Issue
Block a user