Skip to content

Commit

Permalink
Open viewer tab next to active tab, just like View Source. Fixes #12.
Browse files Browse the repository at this point in the history
  • Loading branch information
april committed Jul 26, 2018
1 parent e20a6ba commit d8b6f0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/background/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ browser.webNavigation.onCompleted.addListener(
// open the certificate viewer
browser.pageAction.onClicked.addListener(
details => {
// open the cert viewer page in the next tab over
browser.tabs.create({
url: `/viewer/index.html?tid=${String(details.id)}`
index: details.index + 1,
url: `/viewer/index.html?tid=${String(details.id)}`,
windowId: details.windowId,
});
}
);
Expand Down

0 comments on commit d8b6f0d

Please sign in to comment.