chrome.contextMenus.create(). "documentUrlPatterns" not used
Reported by
berkut.u...@gmail.com,
Mar 2 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Steps to reproduce the problem:
1. Create file "manifest.json":
{
"background":{"persistent":false,"scripts":["background.js"]},
"page_action":{},
"permissions":["tabs","contextMenus"]
}
2. Create file "background.js":
chrome.contextMenus.create(
{
id:"id",
title:"title",
contexts:["page_action"],
documentUrlPatterns:["https://example.com/*"]
}
);
3. Install created extension.
4. Press extension icon.
What is the expected behavior?
Context menu item must be displayed only if url of current tab matched given pattern ("https://example.com/*").
What went wrong?
Field "documentUrlPatterns" ignored for "page_action"'s and "browser_action"'s context menu.
Did this work before? N/A
Chrome version: 56. Channel: stable
OS Version:
Flash Version:
,
Mar 9 2017
,
Aug 23 2017
Content of "manifest.json" (added keys "name", "version" and "manifest_version"):
{
"name": "Extension name",
"version": "0",
"manifest_version": 2,
"background": {
"persistent": false,
"scripts": [ "background.js" ]
},
"page_action": {},
"permissions": [
"tabs",
"contextMenus"
]
}
In screenshot menu item with title "title" displayed for page "chrome://extensions", but must be displayed only on pages "https://example.com/*", as specified in "documentUrlPatterns".
,
Aug 23 2017
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 16 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by hdodda@chromium.org
, Mar 3 2017Labels: Needs-Feedback
338 KB
338 KB View Download