bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
You can allow users to interact with your extension through the Chrome omnibox (usually called the
address bar). When a user enters extension-defined keywords in the omnibox, your
extension controls what the user sees in the omnibox. The
Omnibox New Tab Search
sample extension uses "nt" as the keyword. When the user types "nt" into the
omnibox, it activates the extension. To signal this to the user, it grayscales
the provided 16 by 16 icon and displays it in the omnibox next to the extension
name.
An example of using the ominibox to trigger an action.
The entered text causes Chrome to send an event to the
omnibox.onInputEntered
event handler. In the handler, the extension opens a new tab containing a Google Search
for the user's entry.
chrome.omnibox.onInputEntered.addListener((text)=>{// Encode user input for special characters , / ? : @ & = + $ #constnewURL=`https://www.google.com/search?q=${encodeURIComponent(text)}`;chrome.tabs.create({url:newURL});});
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-22 UTC."],[],[]]