Is there a clean way for a Google Chrome extension to set a non-local webpage as the new tab page while also keeping the omnibox cleared or highlighted?
The chrome_url_overrides.newtab option in the extension manifest only allows local HTML pages.
Right now, I see two options:
- iframe the webpage in the local extension page. However, many websites won't work properly when iframed.
- Redirect the local new tab page to the webpage. However, this does not reliably highlight the omnibox, so users have to manually set focus to the omnibox before typing, which is a poor user experience.
The ideal solution would keep the webpage be the top frame of the new tab page, and the omnibox would be either cleared or highlighted.
Additional info:
- There's an ongoing, unsolved thread on this topic here for the Chrome extension New Tab Redirect.
- Using
chrome.tabs.update
to redirect the new tab page has historically highlighted the URL. However, this appears to be undocumented and unreliable. The highlighting broke in Chrome 34 and appears to be broken now in Chrome 61 (a bug I just reported).