sample javascript plugin for cordova