JavaScript custom code injection