Merge pull request #175 from thatsatechnique/fix/pager-display-classification

fix: improve pager message display and mute visibility
This commit is contained in:
Smittix
2026-03-04 18:00:33 +00:00
committed by GitHub
9 changed files with 366 additions and 182 deletions

View File

@@ -3611,7 +3611,7 @@
// Pager message filter settings
let pagerFilters = {
hideToneOnly: true,
hideToneOnly: false,
keywords: []
};
@@ -3663,7 +3663,11 @@
const saved = localStorage.getItem('pagerFilters');
if (saved) {
try {
pagerFilters = JSON.parse(saved);
const parsed = JSON.parse(saved);
// Only persist keywords across sessions.
// hideToneOnly defaults to false every session so users
// always see the full traffic stream unless they opt-in.
if (Array.isArray(parsed.keywords)) pagerFilters.keywords = parsed.keywords;
} catch (e) {
console.warn('Failed to load pager filters:', e);
}
@@ -3964,6 +3968,7 @@
// Load pager message filters
loadPagerFilters();
if (typeof SignalCards !== 'undefined') SignalCards.updateMutedIndicator();
// Initialize dropdown nav active state
updateDropdownActiveState();
@@ -6953,20 +6958,21 @@
return null; // Can't determine
}
// Check for high entropy (random-looking data)
const printableRatio = (message.match(/[a-zA-Z0-9\s.,!?-]/g) || []).length / message.length;
// Check for common encrypted patterns (hex strings, base64-like)
const hexPattern = /^[0-9A-Fa-f\s]+$/;
// Check for non-printable characters (outside printable ASCII range)
const hasNonPrintable = /[^\x20-\x7E]/.test(message);
if (printableRatio > 0.8 && !hasNonPrintable) {
return false; // Likely plaintext
} else if (hexPattern.test(message.replace(/\s/g, '')) || hasNonPrintable) {
return true; // Likely encrypted or encoded
// Check for common encrypted patterns (hex strings)
const hexPattern = /^[0-9A-Fa-f\s]+$/;
if (hasNonPrintable) {
return true; // Contains non-printable chars — likely encrypted or encoded
}
if (hexPattern.test(message.replace(/\s/g, ''))) {
return true; // Pure hex data — likely encoded
}
return null; // Unknown
// All printable ASCII (covers base64, structured data, punctuation, etc.)
return false; // Likely plaintext
}
// Generate device fingerprint