{links}</td>`;
            }

            // Remove old rows
            existingIds.forEach(id => {
                if (!fetchedIds.includes(id)) {
                    const trToRemove = tbody.querySelector(`tr[data-id="${id}"]`);
                    tbody.removeChild(trToRemove);
                }
            });
        });
    }

    // Auto-reload
    setInterval(reload, 1000);

    const url = new URL('api', location.href);
    fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
       