Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: firstRun.js

Issue 29573735: Issue 4580 - Replace ext.backgroundPage.sendMessage with runtime.sendMessage (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Oct. 11, 2017, 3:37 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ext/content.js ('K') | « ext/content.js ('k') | i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firstRun.js
===================================================================
--- a/firstRun.js
+++ b/firstRun.js
@@ -50,17 +50,17 @@
setLinks("acceptable-ads-explanation", link, openFilters);
});
getDocLink("contribute", (link) =>
{
setLinks("share-headline", link);
});
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "app.get",
what: "issues"
}, (issues) =>
{
// Show warning if filterlists settings were reinitialized
if (issues.filterlistsReinitialized)
{
E("filterlistsReinitializedWarning").removeAttribute("hidden");
@@ -72,17 +72,17 @@
ext.onMessage.addListener((message) =>
{
if (message.type == "subscriptions.respond")
{
updateSocialLinks();
}
});
- ext.backgroundPage.sendMessage({
+ chrome.runtime.sendMessage({
type: "subscriptions.listen",
filter: ["added", "removed", "updated", "disabled"]
});
}
function updateSocialLinks()
{
for (let network of ["twitter", "facebook", "gplus"])
@@ -109,13 +109,13 @@
getDocLink(event.target.id, (link) =>
{
openSharePopup(link);
});
}
function openFilters()
{
- ext.backgroundPage.sendMessage({type: "app.open", what: "options"});
+ chrome.runtime.sendMessage({type: "app.open", what: "options"});
}
document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
}());
« ext/content.js ('K') | « ext/content.js ('k') | i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld