Fix display navbar with reports
This commit is contained in:
@@ -35,9 +35,13 @@ function shortcutElementReplace(elt, img, text) {
|
||||
// If more than one hyperlink element found,
|
||||
// then keep the last one but with href of the first one.
|
||||
let aElements = elt.getElementsByTagName("a");
|
||||
if (aElements.length > 1) {
|
||||
let imgElements = elt.getElementsByTagName("img");
|
||||
if (aElements.length > 1 || imgElements.length > 0) {
|
||||
aElements[aElements.length - 1].classList.add("has_notif");
|
||||
aElements[aElements.length - 1].setAttribute("href", aElements[0].getAttribute("href"));
|
||||
for (let i = imgElements.length - 1; i >= 0; i --) {
|
||||
imgElements[i].remove();
|
||||
}
|
||||
for (let i = aElements.length - 2; i >= 0; i --) {
|
||||
aElements[i].remove();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user