-
Notifications
You must be signed in to change notification settings - Fork 1
/
LSS_expansion_close_radio_call.user.js
26 lines (22 loc) · 1.2 KB
/
LSS_expansion_close_radio_call.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
// ==UserScript==
// @name LSS expansion close radio call
// @version 1.0
// @author Crazycake
// @description Closes radio request also if you click on button "to msission"
// @include /^https?:\/\/(?:w{3}\.)?(?:operacni-stredisko\.cz|alarmcentral-spil\.dk|leitstellenspiel\.de|missionchief\.gr|(?:missionchief-australia|missionchief|hatakeskuspeli|missionchief-japan|missionchief-korea|nodsentralspillet|meldkamerspel|operador193|jogo-operador112|jocdispecerat112|dispecerske-centrum|112-merkez|dyspetcher101-game)\.com|missionchief\.co\.uk|centro-de-mando\.es|centro-de-mando\.mx|operateur112\.fr|operatore112\.it|operatorratunkowy\.pl|dispetcher112\.ru|larmcentralen-spelet\.se)\/?#?$
// @grant none
// ==/UserScript==
(function () {
'use strict';
const observertarget = $('#radio_messages_important')[0];
const observerOptions = {
childList: true,
};
const observer = new MutationObserver(handleObserved);
function handleObserved(mutations) {
$('.radio_message_close').each(function () {
$(this).prev().addClass('radio_message_close').attr('vehicle_id', $(this).attr('vehicle_id'));
});
}
observer.observe(observertarget, observerOptions);
})();