omnibox

How to steal focus from the omnibox in a Chrome extension on the new tab page?

狂风中的少年 提交于 2019-12-18 04:14:10
问题 I'm making a Chrome extension that involves putting a text input on the new tab page, and immediately giving focus to that input text when the new tab page loads. After being unable to get focus using traditional methods (e.g. focus() ), I stumbled upon this question: Chrome 27: New Tab Page extension can't steal focus from Omnibox which states that Chrome has now made it so that you can't steal omnibox focus on a new tab page. Given that Chrome is fine with giving focus to any site that isn

Chrome Omnibox Special Characters Throw Error

时间秒杀一切 提交于 2019-12-10 23:01:34
问题 I'm writing a basic Chrome Extension to add suggestions in the Omnibox from a JSON feed. Nearly all queries entered will display results as expected in the suggestions dropdown. However, it seems that whenever an ampersand (&) is returned as part of the description, Chrome throws an error. The error thrown reads "xmlParseEntityRef: no name(...)" and is called from the parseOmniboxDescription method within Chrome. Any help with this matter would be greatly appreciated. I'm not sure if this is

Listen to chrome omnibox events/text without any keyword triggering

我与影子孤独终老i 提交于 2019-12-02 02:48:15
问题 I learnt how to invoke my extension's background js by typing a specific keyword in the omnibox. But I need to enable my extension to listen to the text typed in the omnibox without the help of any keyword. Example: If user types, abc or abcd or abcd.com, my extension should get triggered. Here I cant rely on any keyword, cause user would directly type the target site name. When I tried using the keyword as the possible target name (say abcd.com) the triggering doesnt work since the moment

Listen to chrome omnibox events/text without any keyword triggering

喜你入骨 提交于 2019-12-01 23:09:08
I learnt how to invoke my extension's background js by typing a specific keyword in the omnibox. But I need to enable my extension to listen to the text typed in the omnibox without the help of any keyword. Example: If user types, abc or abcd or abcd.com, my extension should get triggered. Here I cant rely on any keyword, cause user would directly type the target site name. When I tried using the keyword as the possible target name (say abcd.com) the triggering doesnt work since the moment user types abc, chrome autosuggests abcd.com and user selects it directly and keyword triggering doesnt

How to steal focus from the omnibox in a Chrome extension on the new tab page?

时光毁灭记忆、已成空白 提交于 2019-11-29 05:06:44
I'm making a Chrome extension that involves putting a text input on the new tab page, and immediately giving focus to that input text when the new tab page loads. After being unable to get focus using traditional methods (e.g. focus() ), I stumbled upon this question: Chrome 27: New Tab Page extension can't steal focus from Omnibox which states that Chrome has now made it so that you can't steal omnibox focus on a new tab page. Given that Chrome is fine with giving focus to any site that isn't the new tab page, I've been trying to come up with workarounds, but nothing is really satisfactory. I