Cable-Desktop/js/index.js

27 lines
863 B
JavaScript
Raw Normal View History

/*global $, Whisper, Backbone, textsecure, extension*/
/*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
2015-05-11 23:22:15 +02:00
extension.windows.getBackground(function(bg) {
if (bg.textsecure.storage.user.getNumber() === undefined) {
window.location = '/options.html';
} else {
extension.windows.getCurrent(function(appWindow) {
var view = new bg.Whisper.InboxView({appWindow: appWindow});
view.$el.prependTo(bg.$('body',document));
window.openConversation = function(conversation) {
if (conversation) {
2015-09-21 19:21:33 +02:00
view.openConversation(null, conversation);
}
};
openConversation(bg.getOpenConversation());
});
2015-05-11 23:22:15 +02:00
}
});
}());