Sha256: 1dc19b1b63a06e26f58bbf2ab68ffa49f2049859dde48a2beed448b57331016c
Contents?: true
Size: 505 Bytes
Versions: 21
Compression:
Stored size: 505 Bytes
Contents
function truncate(str, limit) { var bits, i; bits = str.split(''); if (bits.length > limit) { for (i = bits.length - 1; i > -1; --i) { if (i > limit) { bits.length = i; } else if (' ' === bits[i]) { bits.length = i; break; } } bits.push('...'); } return bits.join(''); } function blee( url ) { if( url == "/explore") window.location = url; else $.ajax( {url: url, dataType: 'script', method: 'GET'} ); return false; }
Version data entries
21 entries across 21 versions & 2 rubygems