mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Move icons back into SIG data
This commit is contained in:
@@ -285,6 +285,19 @@ function callWanted(call) {
|
||||
}
|
||||
}
|
||||
|
||||
// Get the Font Awesome icon for a given SIG. If the SIG is unknown, the provided default symbol will be returned
|
||||
// The sig is provided by name as a string, while all_sigs contains all the SIG info from the options call. This
|
||||
// is because sometimes the sig name arrives via a spot and therefore we need to look up the rest of the SIG data
|
||||
// separately.
|
||||
function sigToIcon(sig, all_sigs, defaultIcon) {
|
||||
if (sig) {
|
||||
const match = all_sigs.find((check_sig) => check_sig["name"].toUpperCase() === sig.toUpperCase());
|
||||
if (match) {
|
||||
return match["icon"];
|
||||
}
|
||||
}
|
||||
return defaultIcon;
|
||||
}
|
||||
|
||||
// Startup
|
||||
$(document).ready(function () {
|
||||
|
||||
Reference in New Issue
Block a user