Remove main.js requirement for themes

This is for #8626.
@le717 Yes -- if you look at line 300, `metadata` is an argument to the function that you're adding this code to.