mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Highlight wanted calls. Closes #117
This commit is contained in:
@@ -269,6 +269,22 @@ function getCredentialHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
// Does the DX call match something in the user's "wanted" list?
|
||||
function callWanted(call) {
|
||||
let wantedString = $("#wantedCalls").val();
|
||||
if (wantedString) {
|
||||
let split = wantedString.split(/[ ,]+/);
|
||||
for (const i in split) {
|
||||
if (split[i].length > 0 && call.toUpperCase().includes(split[i].toUpperCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Startup
|
||||
$(document).ready(function () {
|
||||
|
||||
Reference in New Issue
Block a user