2014-11-09 10:17:26 +00:00
|
|
|
/*global $, Whisper, Backbone, textsecure, extension*/
|
2015-09-07 21:53:43 +00:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
2014-05-04 06:34:13 +00:00
|
|
|
*/
|
2014-11-09 10:17:26 +00:00
|
|
|
(function () {
|
2015-09-01 20:04:20 +00:00
|
|
|
'use strict';
|
2014-05-04 06:34:13 +00:00
|
|
|
|
2015-12-07 21:42:19 +00:00
|
|
|
function logError(error) {
|
|
|
|
extension.windows.getBackground(function(bg) {
|
|
|
|
bg.console.log('index.html: ', error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
window.onerror = function(message, script, line, col, error) {
|
|
|
|
logError(error);
|
|
|
|
};
|
|
|
|
|
2015-09-01 20:04:20 +00:00
|
|
|
function render() {
|
|
|
|
extension.windows.getBackground(function(bg) {
|
2017-04-10 19:37:42 +00:00
|
|
|
bg.owsDesktopApp.getAppView(window).then(function(appView) {
|
|
|
|
var bodyEl = document.getElementById('signal-container');
|
|
|
|
bodyEl.innerHTML = "";
|
2017-04-16 06:44:29 +00:00
|
|
|
bodyEl.appendChild(appView.el);
|
2015-05-21 20:05:52 +00:00
|
|
|
});
|
2015-09-01 20:04:20 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener('onreload', render);
|
|
|
|
render();
|
2014-11-09 10:17:26 +00:00
|
|
|
}());
|