Crop words in a content by javascript