adds javascript from threads/edit