From a01bdf7b5a15d5f8315bc240da5e8e93aac2be60 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 30 Jan 2016 18:06:04 -0600 Subject: [PATCH] chrome.extension.onMessage -> chrome.runtime.onMessage --- apply.js | 2 +- background.js | 2 +- edit.js | 2 +- manage.js | 2 +- popup.js | 2 +- storage.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apply.js b/apply.js index a0e0e914..a130e7c1 100644 --- a/apply.js +++ b/apply.js @@ -22,7 +22,7 @@ function requestStyles() { chrome.runtime.sendMessage(request, applyStyles); } -chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { // Also handle special request just for the pop-up switch (request.method == "updatePopup" ? request.reason : request.method) { case "styleDeleted": diff --git a/background.js b/background.js index 9ff19214..9077a3a6 100644 --- a/background.js +++ b/background.js @@ -49,7 +49,7 @@ chrome.tabs.onRemoved.addListener(function(tabId, info) { delete tabUrlHasHash[tabId]; }); -chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { switch (request.method) { case "getStyles": var styles = getStyles(request, sendResponse); diff --git a/edit.js b/edit.js index 2a9d6e5a..43685dea 100644 --- a/edit.js +++ b/edit.js @@ -1610,7 +1610,7 @@ function getParams() { return params; } -chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { switch (request.method) { case "styleUpdated": if (styleId == request.id) { diff --git a/manage.js b/manage.js index 84828e3f..b1bd0388 100644 --- a/manage.js +++ b/manage.js @@ -165,7 +165,7 @@ function getStyleElement(event) { return null; } -chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { switch (request.method) { case "styleUpdated": handleUpdate(request.style); diff --git a/popup.js b/popup.js index 57231fd2..127b9459 100644 --- a/popup.js +++ b/popup.js @@ -185,7 +185,7 @@ function handleDelete(id) { } } -chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { +chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { if (request.method == "updatePopup") { switch (request.reason) { case "styleAdded": diff --git a/storage.js b/storage.js index f5b0c2df..43779bcc 100644 --- a/storage.js +++ b/storage.js @@ -146,7 +146,7 @@ function setupLivePrefs(IDs) { prefs.set(this.id, isCheckbox(this) ? this.checked : this.value); }); }); - chrome.extension.onMessage.addListener(function(request) { + chrome.runtime.onMessage.addListener(function(request) { if (request.prefName in localIDs) { updateElement(request.prefName); }