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

Unified Diff: firstRun.js

Issue 29573083: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Add polyfill.js to README.md Created Oct. 17, 2017, 12:35 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
« no previous file with comments | « firstRun.html ('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);
});
- chrome.runtime.sendMessage({
+ browser.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();
}
});
- chrome.runtime.sendMessage({
+ browser.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()
{
- chrome.runtime.sendMessage({type: "app.open", what: "options"});
+ browser.runtime.sendMessage({type: "app.open", what: "options"});
}
document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
}());
« no previous file with comments | « firstRun.html ('k') | i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld