diff --git a/background.html b/background.html index f03238f96..d4a7773a9 100644 --- a/background.html +++ b/background.html @@ -17,6 +17,7 @@ + diff --git a/js/fake_api.js b/js/fake_api.js new file mode 100644 index 000000000..8d1e099a0 --- /dev/null +++ b/js/fake_api.js @@ -0,0 +1,27 @@ +var FakeWhisperAPI = function() { + + this.doAjax = function(param) { + if (param.success_callback) { + setTimeout(param.success_callback, 100, param.response); + } + } + + this.getKeysForNumber = function(number, success_callback, error_callback) { + this.doAjax({ success_callback: success_callback, + response : [{ identityKey: 1, + deviceId : 1, + publicKey : 1, + keyId : 1 }] + }); + } + + this.sendMessages = function(jsonData, success_callback, error_callback) { + this.doAjax({ success_callback: success_callback, + response : { missingDeviceIds: [] } + }); + } +}; + +FakeWhisperAPI.prototype = API; +API = new FakeWhisperAPI(); + diff --git a/options.html b/options.html index fad6e53cc..b5d34b2db 100644 --- a/options.html +++ b/options.html @@ -41,6 +41,7 @@ + diff --git a/popup.html b/popup.html index 6c2d39d87..da4b9b72b 100644 --- a/popup.html +++ b/popup.html @@ -30,6 +30,7 @@ +