added JS for cordova plugin