Index: desktop-options.js |
=================================================================== |
--- a/desktop-options.js |
+++ b/desktop-options.js |
@@ -45,17 +45,17 @@ |
let lastArg = paramValues[paramValues.length - 1]; |
if (typeof lastArg == "function") |
callback = lastArg; |
for (let i = 0; i < paramValues.length - (callback ? 1 : 0); i++) |
message[paramKeys[i]] = paramValues[i]; |
} |
- ext.backgroundPage.sendMessage(message, callback); |
+ chrome.runtime.sendMessage(message, callback); |
}; |
} |
const getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); |
const getInfo = wrapper({type: "app.get"}, "what"); |
const getPref = wrapper({type: "prefs.get"}, "key"); |
const togglePref = wrapper({type: "prefs.toggle"}, "key"); |
const getSubscriptions = wrapper({type: "subscriptions.get"}, |
@@ -156,30 +156,30 @@ |
}); |
getPref("notifications_showui", showNotificationsUI => |
{ |
if (!showNotificationsUI) |
document.getElementById("shouldShowNotificationsContainer").hidden = true; |
}); |
// Register listeners in the background message responder |
- ext.backgroundPage.sendMessage({ |
+ chrome.runtime.sendMessage({ |
type: "app.listen", |
filter: ["addSubscription", "focusSection"] |
}); |
- ext.backgroundPage.sendMessage({ |
+ chrome.runtime.sendMessage({ |
type: "filters.listen", |
filter: ["added", "loaded", "removed"] |
}); |
- ext.backgroundPage.sendMessage({ |
+ chrome.runtime.sendMessage({ |
type: "prefs.listen", |
filter: ["notifications_ignoredcategories", "notifications_showui", |
"show_devtools_panel", "shouldShowBlockElementMenu"] |
}); |
- ext.backgroundPage.sendMessage({ |
+ chrome.runtime.sendMessage({ |
type: "subscriptions.listen", |
filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
"title", "downloadStatus", "downloading"] |
}); |
// Load recommended subscriptions |
loadRecommendations(); |