Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

documentUrlPatterns

chrome.runtime.onInstalled.addListener(()=>{
    chrome.contextMenus.create({
      "title": 'Save to photos',
      "contexts": ["all"],
      "id": "myContextMenuId",
      "documentUrlPatterns":['*://*.developer.chrome.com/*']

    })
})

//Context created for all HTTP, HTTPS and WebSocket URLs that are hosted at "developer.chrome.com" or one of its subdomains.
 
PREVIOUS NEXT
Tagged: #documentUrlPatterns
ADD COMMENT
Topic
Name
6+7 =