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

Unified Diff: lib/filterComposer.js

Issue 29511561: Issue 5347 - Check for contextMenus API support (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Minimize changes and add comments Created Aug. 16, 2017, 12:07 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/background.js ('K') | « ext/background.js ('k') | 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
@@ -171,16 +171,21 @@
onclick(page)
{
page.sendMessage({type: "composer.content.contextMenuClicked"});
}
};
function updateContextMenu(page, filter)
{
+ // Firefox for Android does not support context menus.
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1269062
+ if (!("contextMenus" in chrome))
+ return;
Wladimir Palant 2017/08/16 13:21:56 This change won't be necessary any more if my prev
Manish Jethani 2017/08/16 19:39:09 Done.
+
page.contextMenus.remove(contextMenuItem);
if (typeof filter == "undefined")
filter = checkWhitelisted(page);
if (!filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page))
page.contextMenus.create(contextMenuItem);
}
« ext/background.js ('K') | « ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld