v50: add debug logging for spacer click

This commit is contained in:
primal
2026-01-30 16:41:56 -05:00
parent 51d05e18a1
commit 2289d73288
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -22,11 +22,15 @@ function initDashboard() {
document.addEventListener('click', (e) => {
const spacer = e.target.closest('.domain-spacer');
if (spacer) {
console.log('Spacer clicked:', spacer);
const block = spacer.closest('.domain-block');
console.log('Block found:', block);
if (block) {
const feedsDiv = block.querySelector('.domain-feeds');
console.log('FeedsDiv found:', feedsDiv);
if (feedsDiv) {
const isVisible = feedsDiv.style.display !== 'none';
console.log('isVisible:', isVisible, '-> toggling to:', !isVisible);
feedsDiv.style.display = isVisible ? 'none' : 'block';
}
}
@@ -115,11 +119,11 @@ function initDashboard() {
// Domain name (links to site)
html += `<a class="domain-name" href="https://${escapeHtml(d.host)}" target="_blank" style="color: #0af; text-decoration: none;">${escapeHtml(d.host)}</a>`;
// Spacer (clickable to toggle feeds)
// Spacer (clickable to toggle feeds) - uses &nbsp; to ensure clickable area
if (d.last_error) {
html += `<span class="domain-spacer" style="color: #f66; margin-left: 10px; font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;" title="${escapeHtml(d.last_error)}">${escapeHtml(d.last_error)}</span>`;
} else {
html += '<span class="domain-spacer" style="flex: 1; cursor: pointer;"></span>';
html += '<span class="domain-spacer" style="flex: 1; cursor: pointer;">&nbsp;</span>';
}
// Drop button (only for skipped domains)
+1 -1
View File
@@ -534,7 +534,7 @@ const dashboardHTML = `<!DOCTYPE html>
<div id="output"></div>
</div>
<div style="color: #333; font-size: 11px; margin-top: 10px;">v49</div>
<div style="color: #333; font-size: 11px; margin-top: 10px;">v50</div>
<div class="updated" id="updatedAt">Last updated: {{.UpdatedAt.Format "2006-01-02 15:04:05"}}</div>
</body>