Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
fix: Redirects new tab to my shots
Browse files Browse the repository at this point in the history
  • Loading branch information
nihakhanna committed Mar 10, 2017
1 parent 94000f7 commit 4bf93ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/webextension/background/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ window.main = (function () {
});

chrome.browserAction.onClicked.addListener(function(tab) {
if(tab.url.match(/about:(newtab|blank)/i)) {
chrome.tabs.update({url: backend + "/shots"});
}
else {
sendEvent("start-shot", "toolbar-pageshot-button");
catcher.watchPromise(loadSelector());
}
});

chrome.contextMenus.create({
Expand Down

0 comments on commit 4bf93ea

Please sign in to comment.