(sensor)
| 13921 | if (pwnLogStopTimeout) { |
| 13922 | return; |
| 13923 | } |
| 13924 | pwnLogStopTimeout = setTimeout(() => { |
| 13925 | stopPwnLogStreaming(); |
| 13926 | pwnLogStopTimeout = null; |
| 13927 | }, 12000); |
| 13928 | } |
| 13929 | |
| 13930 | function setPwnLogEmptyMessage(message) { |
| 13931 | const placeholder = document.getElementById('pwn-log-empty'); |
| 13932 | if (!placeholder) { |
| 13933 | return; |
| 13934 | } |
| 13935 | placeholder.textContent = message; |
| 13936 | placeholder.classList.remove('hidden'); |
| 13937 | } |
| 13938 | |
| 13939 | async function fetchPwnLogs(options = {}) { |
| 13940 | if (pwnLogFetchInFlight) { |
| 13941 | return; |
| 13942 | } |
| 13943 | |
| 13944 | const viewer = document.getElementById('pwn-log-viewer'); |
| 13945 | if (!viewer) { |
| 13946 | return; |
| 13947 | } |
| 13948 | |
| 13949 | pwnLogFetchInFlight = true; |
| 13950 | |
| 13951 | try { |
| 13952 | const params = new URLSearchParams(); |
| 13953 | if (pwnLogCursor > 0 && !options.initial) { |
| 13954 | params.set('cursor', pwnLogCursor.toString()); |
| 13955 | } else { |
| 13956 | params.set('tail', '8192'); |
no outgoing calls
no test coverage detected