mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
Compatibility with all phonegap versions
The new script works with every phonegap version
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
var AccountList = function() {};
|
||||
|
||||
AccountList.prototype.get = function(params, success, fail) {
|
||||
return PhoneGap.exec( function(args) {
|
||||
success(args);
|
||||
}, function(args) {
|
||||
fail(args);
|
||||
}, 'AccountList', '', [params]);
|
||||
};
|
||||
var AccountList = function(gap) {
|
||||
|
||||
PhoneGap.addConstructor(function() {
|
||||
PhoneGap.addPlugin('AccountList', new AccountList());
|
||||
});
|
||||
AccountList.prototype.get = function(params, success, fail) {
|
||||
return gap.exec( function(args) {
|
||||
success(args);
|
||||
}, function(args) {
|
||||
fail(args);
|
||||
}, 'AccountList', '', [params]);
|
||||
};
|
||||
|
||||
gap.addConstructor(function () {
|
||||
if (gap.addPlugin) {
|
||||
gap.addPlugin("AccountList", new AccountList());
|
||||
} else {
|
||||
if (!window.plugins) {
|
||||
window.plugins = {};
|
||||
}
|
||||
|
||||
window.plugins.ccountList = new AccountList();
|
||||
}
|
||||
});
|
||||
|
||||
})(window.cordova || window.Cordova || window.PhoneGap);
|
||||
|
||||
Reference in New Issue
Block a user