Update "main.js" to v4.0