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

Unified Diff: lib/options.js

Issue 29569615: Noissue - Replace ext.pages.query with tabs.query (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 8, 2017, 11: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
« no previous file with comments | « lib/icon.js ('k') | lib/stats.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/options.js
===================================================================
--- a/lib/options.js
+++ b/lib/options.js
@@ -123,19 +123,19 @@
}
});
};
// On Firefox for Android, open the options page directly when the browser
// action is clicked.
chrome.browserAction.onClicked.addListener(() =>
{
- ext.pages.query({active: true, lastFocusedWindow: true}, pages =>
+ chrome.tabs.query({active: true, lastFocusedWindow: true}, ([tab]) =>
{
- let currentPage = pages[0];
+ let currentPage = new ext.Page(tab);
showOptions(optionsPage =>
{
if (!/^https?:$/.test(currentPage.url.protocol))
return;
optionsPage.sendMessage({
type: "app.respond",
« no previous file with comments | « lib/icon.js ('k') | lib/stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld