Make getBackground async
This commit is contained in:
parent
a57363f1c0
commit
76e170686a
6 changed files with 198 additions and 175 deletions
14
js/index.js
14
js/index.js
|
@ -16,12 +16,14 @@
|
|||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
var bg = extension.windows.getBackground();
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
if (bg.textsecure.storage.user.getNumber() === undefined) {
|
||||
window.location = '/options.html';
|
||||
} else {
|
||||
new bg.Whisper.InboxView().$el.prependTo(bg.$('body',document));
|
||||
}
|
||||
|
||||
extension.windows.getBackground(function(bg) {
|
||||
if (bg.textsecure.storage.user.getNumber() === undefined) {
|
||||
window.location = '/options.html';
|
||||
} else {
|
||||
new bg.Whisper.InboxView().$el.prependTo(bg.$('body',document));
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue