Only enqueue scripts when needed