Fixed extension in javascript