Skip to content

Commit

Permalink
Open result page
Browse files Browse the repository at this point in the history
  • Loading branch information
richa208 committed Mar 6, 2018
1 parent 3161281 commit ba42887
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion code/background.js
Expand Up @@ -2,7 +2,7 @@ chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.create({
'url': chrome.extension.getURL('popup.html')
}, function(tab) {

localStorage.setItem("openThroughWeb", "no");
});
});
//it listens to messages sent by content scripts
Expand All @@ -15,6 +15,8 @@ chrome.runtime.onMessage.addListener(
}, function(tab) {

});
localStorage.setItem("value", request.value);//saves the query that user has selected
localStorage.setItem("openThroughWeb", "yes");
sendResponse({mesg: "response received"});
}
});
9 changes: 5 additions & 4 deletions code/contentScript.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions code/js/popup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba42887

Please sign in to comment.