add conditional js loading