title: How do I restrict context menus to appear only for certain selected text in a Chrome extension?
body: <p>I made a very simple <a href="https://chrome.google.com/extensions/detail/goanbaknlbojfglcepjnankoobfakbpg" rel="noreferrer">chrome extension</a> which allows users to highlight a DOI number, right-click and choose "Resolve DOI", and it sends them to the associated web page. Right now, this is done in background.html with:</p>
  
  <pre><code>chrome.contextMenus.create({
  "title" : "Resolve DOI",
  "type" : "normal",
  "contexts" : ["selection"],
  "onclick" : getClickHandler()
  });
  </code></pre>
  
  <p>I would like to restrict the context menu option to only appear if the text they highlight begins with "10." Any suggestions on how to do this? Do I need to wait for the Context Menus module to become more advanced?</p>