FIX: JavaScript script replacement