widgetize the client side js