-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuncheckAllVehicles.user.js
29 lines (25 loc) · 1.16 KB
/
uncheckAllVehicles.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
// ==UserScript==
// @name uncheckAllVehicles
// @version 1.0
// @description Entfernt alle ausgewählten Fahrzeuge mit einem Button-Klick und setzt den Zähler der AAO's vom Module AAO-Zähler des LSS-Managers
// @author Battlebozz
// @include *://www.leitstellenspiel.de/
// @include *://www.leitstellenspiel.de/*
// @include *://www.missionchief.com/*
// @include *://www.missionchief.com/
// @include *://www.meldkamerspel.com/*
// @include *://www.meldkamerspel.com/
// @grant none
// ==/UserScript==
(function () {
console.log('uncheckAllVehicles successfully loaded!');
function uncheckAll() {
$('.vehicle_select_table_tr input:checkbox').removeAttr('checked');
$('#vehicle_amount').replaceWith('<span id="vehicle_amount" class="badge vehicle_amount_selected">0</span>');
if ($('.aaoZaehler').length) {
$('.aaoZaehler').replaceWith(' <span class="aaoZaehler">0</span>');
}
}
$('#mission-aao-group').after('<button id="uncheckAll" class="btn btn-default btn-xs" type="button">Uncheck All Vehicles</button>');
$('#uncheckAll').click(uncheckAll);
})();