MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / filterCredsByService

Function filterCredsByService

web/scripts/ragnar_modern.js:85–94  ·  view source on GitHub ↗
(svc)

Source from the content-addressed store, hash-verified

83function onCredSearch(val) { credIPSearch = val.trim().toLowerCase(); displayCredentials(credentialsCache); }
84
85function filterCredsByService(svc) {
86 credServiceFilter = svc;
87 document.querySelectorAll('.cred-svc-btn').forEach(b => {
88 const active = b.getAttribute('data-svc') === svc;
89 b.classList.toggle('bg-Ragnar-600', active);
90 b.classList.toggle('bg-slate-700', !active);
91 b.classList.toggle('hover:bg-slate-600', !active);
92 });
93 displayCredentials(credentialsCache);
94}
95
96function sortCredsBy(col) {
97 if (credSortCol === col) { credSortAsc = !credSortAsc; } else { credSortCol = col; credSortAsc = true; }

Callers

nothing calls this directly

Calls 1

displayCredentialsFunction · 0.70

Tested by

no test coverage detected