Remove root from javascript