add frontend javascript