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

Unified Diff: ext/background.js

Issue 29511561: Issue 5347 - Check for contextMenus API support (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Remove unnecessary checks Created Aug. 16, 2017, 7: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: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -418,17 +418,19 @@
/* Context menus */
let contextMenuItems = new ext.PageMap();
let contextMenuUpdating = false;
let updateContextMenu = () =>
{
- if (contextMenuUpdating)
+ // Firefox for Android does not support context menus.
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1269062
+ if (!("contextMenus" in chrome) || contextMenuUpdating)
return;
contextMenuUpdating = true;
chrome.tabs.query({active: true, lastFocusedWindow: true}, tabs =>
{
chrome.contextMenus.removeAll(() =>
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld