Skip to content

Commit

Permalink
Only open page once
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewilyas committed Sep 14, 2016
1 parent 1717205 commit 525f3b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extension/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ chrome.omnibox.onInputChanged.addListener(omnibarHandler);
chrome.omnibox.onInputEntered.addListener(acceptInput);
chrome.runtime.onMessage.addListener(handleMessage);
chrome.runtime.onInstalled.addListener(function (object) {
chrome.tabs.create({url: "https://github.com/lengstrom/falcon"}, function (tab) {
});
chrome.storage.local.get("shouldOpenTab", function(item) {
if (Object.keys(item).length == 0) {
chrome.tabs.create({url: "https://github.com/lengstrom/falcon"}, function (tab) {
});
chrome.storage.local.set({"shouldOpenTab": {"dontShow": true}})
}
})
});

function acceptInput(text, disposition) {
Expand Down

0 comments on commit 525f3b1

Please sign in to comment.