added client-side code for js complexity widget