chrome.extension.onMessage -> chrome.runtime.onMessage
This commit is contained in:
parent
2c1987f91a
commit
a01bdf7b5a
2
apply.js
2
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":
|
||||
|
|
|
@ -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);
|
||||
|
|
2
edit.js
2
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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
2
popup.js
2
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":
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user