Remove main.js requirement for themes

This is for #8626.