-
Notifications
You must be signed in to change notification settings - Fork 1
/
expandMapLegend.user.js
31 lines (29 loc) · 1.03 KB
/
expandMapLegend.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ==UserScript==
// @name Expand map legend
// @namespace http://tampermonkey.net/
// @version 1.0.1
// @description Add arrows to expand & fold cards on maplegend
// @author KeineAhnung
// @match https://rettungssimulator.online/mapLegend
// @icon https://www.google.com/s2/favicons?domain=rettungssimulator.online
// @updateURL https://github.com/TheKeineAhnung/ReSi-Scripte/raw/main/expandMapLegend.user.js
// @downloadURL https://github.com/TheKeineAhnung/ReSi-Scripte/raw/main/expandMapLegend.user.js
// @grant none
// ==/UserScript==
function addArrows() {
let headlines = document.querySelectorAll("div.card-headline");
let arrow =
'<i class="fas fa-angle-up card-collapse-toggle pointer right"></i>';
headlines.forEach((e) => {
if (
!e.classList.contains("bg-organisation-4") ||
e.textContent.includes("Leitstelle")
) {
e.parentElement.classList.add("collapsed");
}
e.innerHTML += arrow;
});
}
window.addEventListener("load", () => {
addArrows();
});