Added function to load widget js