Ori, 1 year ago @fiofiofio It may be worthwhile to add a check around your removeButtons.querySelectorAll("button").forEach(button => { section. For instance: if (removeButtons.length > 0) { removeButtons.querySelectorAll("button").forEach(button => { button.style.backgroundColor = 'var(--kbin-vote-bg)'; button.style.color = 'var(--kbin-vote-text-color)'; button.style.marginLeft = 'var(--kbin-entry-element-spacing)'; button.style.padding = '2px'; button.style.border = 'var(--kbin-section-border)'; }); }
@fiofiofio
It may be worthwhile to add a check around your removeButtons.querySelectorAll("button").forEach(button => { section. For instance:
if (removeButtons.length > 0) { removeButtons.querySelectorAll("button").forEach(button => { button.style.backgroundColor = 'var(--kbin-vote-bg)'; button.style.color = 'var(--kbin-vote-text-color)'; button.style.marginLeft = 'var(--kbin-entry-element-spacing)'; button.style.padding = '2px'; button.style.border = 'var(--kbin-section-border)'; }); }