v50: add debug logging for spacer click
This commit is contained in:
+6
-2
@@ -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 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;"> </span>';
|
||||
}
|
||||
|
||||
// Drop button (only for skipped domains)
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user