Skip to content

Commit

Permalink
Merge pull request #49 from nickmooney/master
Browse files Browse the repository at this point in the history
Migrate from deprecated chrome.extension API to chrome.runtime
  • Loading branch information
altryne committed Dec 12, 2017
2 parents 69ccee7 + eb94070 commit 1ce45cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/src/bg/background.js
Expand Up @@ -6,8 +6,8 @@


//example of using a message handler from the inject scripts
chrome.extension.onMessage.addListener(
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
chrome.pageAction.show(sender.tab.id);
chrome.pageAction.show(sender.tab.id);
sendResponse();
});
4 changes: 2 additions & 2 deletions ext/src/inject/inject.js
@@ -1,4 +1,4 @@
chrome.extension.sendMessage({}, function(response) {
chrome.runtime.sendMessage({}, function(response) {
var readyStateCheckInterval = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(readyStateCheckInterval);
Expand All @@ -10,4 +10,4 @@ chrome.extension.sendMessage({}, function(response) {

}
}, 10);
});
});

0 comments on commit 1ce45cc

Please sign in to comment.