(function () { var node = document.getElementById( "perechen" ), need = 50; if ( node.innerHTML.length > need ) { node.innerHTML = node.innerHTML.slice( 0, need ) + "…"; } })();