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

Unified Diff: ext/background.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 | « no previous file | lib/filterComposer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -116,34 +116,16 @@
callback(new Page(openedTab));
}
};
chrome.tabs.onUpdated.addListener(onUpdated);
};
}
ext.pages = {
- query(info, callback)
- {
- let rawInfo = {};
- for (let property in info)
- {
- switch (property)
- {
- case "active":
- case "lastFocusedWindow":
- rawInfo[property] = info[property];
- }
- }
-
- chrome.tabs.query(rawInfo, tabs =>
- {
- callback(tabs.map(tab => new Page(tab)));
- });
- },
onLoading: new ext._EventTarget(),
onActivated: new ext._EventTarget(),
onRemoved: new ext._EventTarget()
};
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) =>
{
if (changeInfo.status == "loading")
« no previous file with comments | « no previous file | lib/filterComposer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld