add js function.