add js directive