Made js changes to convert from appMobi til Intel XDK