make "view more" button neater

remotes/1693045480750635534/spooky-22
Aevann1 2022-07-03 12:15:15 +02:00
parent 57e424af5b
commit cae656186a
1 changed files with 12 additions and 1 deletions

View File

@ -1183,7 +1183,18 @@
{% if p.rest %}
<button class="mt-4 mb-3 btn btn-primary" onclick="document.getElementById('rest').classList.toggle('d-none')">
<script>
function viewmore(btn) {
btn.disabled = true
btn.classList.add('disabled');
document.getElementById('rest').classList.toggle('d-none')
setTimeout(() => {
btn.disabled = false;
btn.classList.remove('disabled');
}, 1000);
}
</script>
<button class="mt-4 mb-3 btn btn-primary" onclick="viewmore(this)">
VIEW MORE COMMENTS
</button>