Changed js-file to support new Cordova

Added supported for new Cordova(PhoneGap) version