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

Unified Diff: lib/filterComposer.js

Issue 29516679: Issue 5347 - Do not show composer menu item on Firefox for Android (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Check for chrome.windows instead Created Aug. 16, 2017, 8:15 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -175,18 +175,23 @@
};
function updateContextMenu(page, filter)
{
page.contextMenus.remove(contextMenuItem);
if (typeof filter == "undefined")
filter = checkWhitelisted(page);
- if (!filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page))
+ if (!filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page) &&
+ // Firefox for Android does not support the windows API, which is
+ // required for the composer to work.
Wladimir Palant 2017/08/17 12:22:49 Not really, we could fall back to creating a new t
Manish Jethani 2017/08/17 13:25:19 Do you think it makes sense to make the composer w
Sebastian Noack 2017/08/18 09:23:01 Also, the user experience when selecting elements
Wladimir Palant 2017/08/18 20:52:32 Ok, fine with me.
Sebastian Noack 2017/08/23 12:00:35 Perhaps we should rather check for `info.applicati
Manish Jethani 2017/08/24 10:34:59 Done.
+ "windows" in chrome)
+ {
page.contextMenus.create(contextMenuItem);
+ }
}
FilterNotifier.on("page.WhitelistingStateRevalidate", updateContextMenu);
Prefs.on("shouldShowBlockElementMenu", () =>
{
ext.pages.query({}, pages =>
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld