Remove dead code
These are all unused, obsolete, or no-op functions at this point. // FREEBIEpull/749/head
parent
c4ccf7c8e3
commit
bd7f4febaa
@ -1,28 +0,0 @@
|
|||||||
/*global $, Whisper, Backbone, textsecure, extension*/
|
|
||||||
/*
|
|
||||||
* vim: ts=4:sw=4:expandtab
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
window.Whisper = window.Whisper || {};
|
|
||||||
|
|
||||||
extension.windows.getCurrent(function (windowInfo) {
|
|
||||||
extension.windows.getBackground(function(bg) {
|
|
||||||
window.$ = bg.$;
|
|
||||||
var body = $('body', document);
|
|
||||||
var conversation = bg.getConversationForWindow(windowInfo.id);
|
|
||||||
if (conversation) {
|
|
||||||
window.document.title = conversation.getTitle();
|
|
||||||
var view = new bg.Whisper.ConversationView({
|
|
||||||
model: conversation,
|
|
||||||
appWindow: windowInfo
|
|
||||||
});
|
|
||||||
view.$el.prependTo(body);
|
|
||||||
view.$('input.send-message').focus();
|
|
||||||
} else {
|
|
||||||
$('<div>').text('Error').prependTo(body);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}());
|
|
@ -1,30 +0,0 @@
|
|||||||
/*global $, Whisper, Backbone, textsecure, extension*/
|
|
||||||
/*
|
|
||||||
* vim: ts=4:sw=4:expandtab
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function logError(error) {
|
|
||||||
extension.windows.getBackground(function(bg) {
|
|
||||||
bg.console.log('index.html: ', error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onerror = function(message, script, line, col, error) {
|
|
||||||
logError(error);
|
|
||||||
};
|
|
||||||
|
|
||||||
function render() {
|
|
||||||
extension.windows.getBackground(function(bg) {
|
|
||||||
bg.owsDesktopApp.getAppView(window).then(function(appView) {
|
|
||||||
var bodyEl = document.getElementById('signal-container');
|
|
||||||
bodyEl.innerHTML = "";
|
|
||||||
bodyEl.appendChild(appView.el);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('onreload', render);
|
|
||||||
render();
|
|
||||||
}());
|
|
@ -1,28 +0,0 @@
|
|||||||
/*global $, Whisper, Backbone, extension*/
|
|
||||||
/*
|
|
||||||
* vim: ts=4:sw=4:expandtab
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This script should only be included in background.html
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
window.Whisper = window.Whisper || {};
|
|
||||||
|
|
||||||
window.isOpen = function() {
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
window.clearAttention = function() {
|
|
||||||
console.log('clear attention');
|
|
||||||
if (window.keepClear) {
|
|
||||||
clearInterval(window.keepClear);
|
|
||||||
delete window.keepClear;
|
|
||||||
}
|
|
||||||
window.keepClear = setInterval(function() {
|
|
||||||
extension.windows.clearAttention(inboxWindowId);
|
|
||||||
}, 2000);
|
|
||||||
};
|
|
||||||
var inboxWindowId = 'inbox';
|
|
||||||
|
|
||||||
})();
|
|
Loading…
Reference in New Issue