Abstract chrome browser action and windows stuff
This commit is contained in:
parent
71da6a1df1
commit
607d5d3307
5 changed files with 45 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue