Converted the widgets frontend file from CoffeeScript to JavaScript