Hi, im looking for the line where i can disable the red flag on the emergency squawk that appears on the aircraft list.
The retrieved squawks are not ver reliable so, i got 7500 like 10 a day, and... come on that would be on the news.
So i would appreciate a walkthrough to delete this flag either with custom content or modify the js files.
Thanks so much in advance.
Change or disable Emergency Flag
Re: Change or disable Emergency Flag
If you save the script below to a file called "NoEmergency.html":
and then install the custom content plugin, run VRS, click Plugins, click Options against the custom content plugin and then:
1. Make sure the Enabled checkbox is ticked.
2. Click New
3. Click the "..." against "Inject file" and choose your NoEmergency.html file
4. Change the address to an asterisk (i.e. *)
5. Click OK
6. Reload the page in the browser
Then that should switch off the isEmergency flag for all aircraft on display.
Code: Select all
<script type="text/javascript">
if(VRS && VRS.globalDispatch && VRS.serverConfig) {
VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {
if(bootStrap.hookInitialised) {
bootStrap.hookInitialised(function(pageSettings) {
var aircraftList = pageSettings.aircraftList;
if(aircraftList) {
aircraftList.hookAppliedJson(function() {
aircraftList.foreachAircraft(function(aircraft) {
if(aircraft.isEmergency.val) {
aircraft.isEmergency.val = false;
}
});
});
}
});
}
});
}
</script>
1. Make sure the Enabled checkbox is ticked.
2. Click New
3. Click the "..." against "Inject file" and choose your NoEmergency.html file
4. Change the address to an asterisk (i.e. *)
5. Click OK
6. Reload the page in the browser
Then that should switch off the isEmergency flag for all aircraft on display.
Re: Change or disable Emergency Flag
Wow! Thanks so much for the quick reply, it worked like a charm.
Regards!
Regards!