Experimental Discovery APIs
Experimental Discovery APIs
The current methods allow extensions to inject suggested links in the recommended pane of the New Tab Page.
API reference: chrome.experimental.discovery
Methods
clearAllSuggestions
chrome.experimental.discovery.clearAllSuggestions()
Clear all the URLs that were previously suggested for discovery by this extension.
removeSuggestion
chrome.experimental.discovery.removeSuggestion(string
linkUrl)
Removes a URL that was previously suggested for discovery by this extension. a linkUrl previously used on a call to suggest.
Parameters
-
linkUrl
(
string
)
- The URl to remove from discovery. Must be exactly the same as
suggest
chrome.experimental.discovery.suggest(experimental.discovery.SuggestDetails
details)
Suggests a URL for discovery.
Parameters
-
details
- Detailed information on the URL to suggest.
Types
experimental.discovery.SuggestDetails
(
object
)
Undocumented.
-
linkText
(
string
)
- The linkified text. It should be relatively short.
-
linkUrl
(
string
)
- The URL to suggest and that will be displayed in the new tab page under the recommended pane.
-
score
(
optional
number
)
- A score indicating how interesting that suggestion is. The value must be between 0 and 1. A suggestion with score 1 is twice as likely to be displayed than one with a score of 0.5. Defaults to 1. TODO: need minimum=0 and maximum=1.