diff --git a/README.md b/README.md index 68a67a3..2f94fe6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ using the Cordova / Phonegap command line interface. ### Without AngularJS -This plugin registers a `cordovaHTTP` global on window +This plugin registers a global object located at `cordova.plugin.http`. ### With AngularJS diff --git a/plugin.xml b/plugin.xml index 381bcf0..411a291 100644 --- a/plugin.xml +++ b/plugin.xml @@ -4,20 +4,20 @@ id="cordova-plugin-advanced-http" version="1.3.0"> - SSL Pinning + Advanced HTTP plugin Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning - + - - + + diff --git a/www/cordovaHTTP.js b/www/cordovaHttp.js similarity index 99% rename from www/cordovaHTTP.js rename to www/cordovaHttp.js index 2800962..ac16312 100644 --- a/www/cordovaHTTP.js +++ b/www/cordovaHttp.js @@ -135,8 +135,6 @@ var http = { } }; -module.exports = http; - if (typeof angular !== 'undefined') { angular.module('cordovaHTTP', []).factory('cordovaHTTP', function ($timeout, $q) { function makePromise(fn, args, async) { @@ -214,6 +212,6 @@ if (typeof angular !== 'undefined') { }; return cordovaHTTP; }); -} else { - window.cordovaHTTP = http; } + +module.exports = http;