const content = document.querySelector('.content'),
contentHeight = document.querySelector('.content').clientHeight,
contentBtn = document.querySelector('.content-btn');
if(contentHeight > 50) {
content.classList.add('content-hide')
contentBtn.style.display = "block"
} else {
contentBtn.style.display = "none"
}
contentBtn.addEventListener('click', function() {
content.classList.toggle('content-show')
})
content.addEventListener('transitionend', function() {
contentBtn.textContent = contentBtn.textContent === 'Подробнее' ? 'Скрыть' : 'Подробнее'
})
console.log(content)
<div class="calculator__btn">C</div><!--
--><div class="calculator__btn">D</div>