Abstract chrome browser action and windows stuff

This commit is contained in:
lilia 2015-01-21 22:21:37 -10:00
parent 71da6a1df1
commit 607d5d3307
5 changed files with 45 additions and 12 deletions

View file

@ -31,7 +31,7 @@
// prevent multiple copies of the same conversation from being opened
if (!windowId) {
// open the panel
chrome.windows.create({
extension.windows.open({
url: 'conversation.html',
type: 'panel',
focused: true,
@ -48,7 +48,7 @@
});
} else {
// focus the panel
chrome.windows.update(windowId, { focused: true }, function () {
extension.windows.focus(windowId, function () {
if (chrome.runtime.lastError) {
// panel isn't actually open...
window.closeConversation(windowId);