Only added JS when in frontend