Index: lib/filterComposer.js |
=================================================================== |
--- a/lib/filterComposer.js |
+++ b/lib/filterComposer.js |
@@ -21,16 +21,17 @@ |
const {defaultMatcher} = require("matcher"); |
const {RegExpFilter} = require("filterClasses"); |
const {FilterNotifier} = require("filterNotifier"); |
const {Prefs} = require("prefs"); |
const {extractHostFromFrame, stringifyURL, isThirdParty} = require("url"); |
const {getKey, checkWhitelisted} = require("whitelisting"); |
const {port} = require("messaging"); |
+const info = require("info"); |
let readyPages = new ext.PageMap(); |
/** |
* Checks whether the given page is ready to use the filter composer |
* |
* @param {Page} page |
* @return {boolean} |
@@ -175,18 +176,24 @@ |
}; |
function updateContextMenu(page, filter) |
{ |
page.contextMenus.remove(contextMenuItem); |
if (typeof filter == "undefined") |
filter = checkWhitelisted(page); |
- if (!filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page)) |
+ |
+ // We don't support the filter composer on Firefox for Android, because the |
+ // user experience on mobile is quite different. |
+ if (info.application != "fennec" && |
+ !filter && Prefs.shouldShowBlockElementMenu && readyPages.has(page)) |
+ { |
page.contextMenus.create(contextMenuItem); |
+ } |
} |
FilterNotifier.on("page.WhitelistingStateRevalidate", updateContextMenu); |
Prefs.on("shouldShowBlockElementMenu", () => |
{ |
ext.pages.query({}, pages => |
{ |