There is no reason to copy a permalink to a blank input, so it is just confusing to be there at all times.
label {
font-weight: 700;
+ padding-block: 8px;
}
button,
}
}
+ #copy-permalink,
#clear-code {
display: none;
}
// Input has been cleared, reset back to default state
if (textarea.value === '') {
+ document.querySelector('#copy-permalink').style.display = 'none';
document.querySelector('#clear-code').style.display = 'none';
return;
}
+ document.querySelector('#copy-permalink').style.display = 'unset';
const events = getEvents(textarea.value);
const uniqueEvents = Array.from(new Set(events));