diff --git a/background.html b/background.html index 1ec48cea..c215ab27 100644 --- a/background.html +++ b/background.html @@ -15,6 +15,190 @@ + + + + + + + + + + + + + + + @@ -24,6 +208,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/conversation.html b/conversation.html index f51d3b22..c23c1dee 100644 --- a/conversation.html +++ b/conversation.html @@ -9,193 +9,9 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/index.html b/index.html index 8c6c315a..a71e5db9 100644 --- a/index.html +++ b/index.html @@ -4,112 +4,14 @@ - - Signal for Chrome - + Signal + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/js/conversation_panel.js b/js/conversation_panel.js index 4d99d064..7322fe4b 100644 --- a/js/conversation_panel.js +++ b/js/conversation_panel.js @@ -21,14 +21,15 @@ extension.windows.getCurrent(function (windowInfo) { var bg = extension.windows.getBackground(); + window.$ = bg.$; var conversation = bg.getConversationForWindow(windowInfo.id); if (conversation) { window.document.title = conversation.getTitle(); - new Whisper.ConversationView({ + new bg.Whisper.ConversationView({ model: conversation - }).$el.prependTo($('body')); + }).$el.prependTo($('body', document)); } else { - $('
').text('Error').prependTo($('body')); + $('
').text('Error').prependTo($('body', document)); } }); }()); diff --git a/js/index.js b/js/index.js index 5da6ac93..4b67276e 100644 --- a/js/index.js +++ b/js/index.js @@ -16,14 +16,14 @@ */ (function () { 'use strict'; + var bg = extension.windows.getBackground(); window.Whisper = window.Whisper || {}; - - if (textsecure.storage.getUnencrypted("number_id") === undefined) { + if (bg.textsecure.storage.getUnencrypted("number_id") === undefined) { window.location = '/options.html'; } else { - new Whisper.InboxView().$el.prependTo($('body')); - textsecure.storage.putUnencrypted("unreadCount", 0); + new bg.Whisper.InboxView().$el.prependTo(bg.$('body',document)); + bg.textsecure.storage.putUnencrypted("unreadCount", 0); extension.navigator.setBadgeText(""); } }());