(sourceId)
| 1604 | } |
| 1605 | |
| 1606 | function getSourceNameById(sourceId) { |
| 1607 | const id = String(sourceId || '').trim(); |
| 1608 | if (!id) return ''; |
| 1609 | try { |
| 1610 | if (typeof window.__frGetSourceNameById === 'function') { |
| 1611 | return String(window.__frGetSourceNameById(id) || ''); |
| 1612 | } |
| 1613 | } catch (e) { /* ignore */ } |
| 1614 | const sel = document.getElementById('sourceSelector'); |
| 1615 | if (sel) { |
| 1616 | const opt = Array.from(sel.options).find(o => o.value === id); |
| 1617 | if (opt) return String(opt.dataset?.sourceName || ''); |
| 1618 | } |
| 1619 | return ''; |
| 1620 | } |
| 1621 | |
| 1622 | function getSourceTypeById(sourceId) { |
| 1623 | const id = String(sourceId || '').trim(); |
no outgoing calls
no test coverage detected