Javascript to move focus to browser address bar? -
this question has answer here:
with safari, if set open new tabs blank, when hit cmd-t, cursor in address bar, ready type url or search.
if set go homepage, cursor not go address bar , have hit keystroke.
is there javascript can put on homepage (i'm 1 uses - usual "bookmark" page) when visit page, focus (cursor) automatically goes browser's address bar?
i add search box want type url directly.
i don't think can that, you've said it's "link page", can put input
on page type address into, use button (or keypress) location = yourinput.value;
take url typed in. won't have omnibox functionality (not unless fancy javascript , integrate google custom search engine, etc.), "just type in url" use case, it'll work.
alternately, google custom search engine (if searching google) pretty easy drop on page, , can event when user confirms, use check if search input has url opposed search in. kind of roll-your-own omnibox. (not touting google, doing cse quite easy: create google account, drop script on page, add bit of markup, , that's pretty it. don't know if duck duck go , such offer same sort of thing.)
Comments
Post a Comment