搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

search engine shotrcut without query

  • 6 回覆
  • 1 有這個問題
  • 25 次檢視
  • 最近回覆由 cor-el

more options

Is there a way to use "search engine shortcut" without query just to go to a website of the appropriate search-engine?

So as, for example, after writing "g" (or "g"+space) in the search bar and pressing Enter, firefox opened the url "https://www.google.com/search?q=" (or something like that).

It used to work this way in older versions of Firefox (before 83), but since then firefox just searches "g" with the default search engine. Or it "eats" the shortcut (after pressing space) and turns it into a "blue/gray search engine label" but it does not allow me to go to the search engine web without writing some query that I need to remove afterwards.

I was using this feature as a sort of bookmark shortcuts to "custom" search engine websites (I'm using tens of them for debugging purposes and often need to fill in some additional parameters to the "text" query - often even to an "empty query").

The closest I got googling was probably "browser.urlbar.update2.emptySearchBehavior" - but it either does not work already, does not do what I'm expecting or I did not come up with the correct value for it.

附加的畫面擷圖

所有回覆 (6)

more options

In the address box, click on the magnifying glass. Check out the bottom of the window.

有幫助嗎?

more options

FredMcD said

In the address box, click on the magnifying glass. Check out the bottom of the window.

Thank you for a tip, however clicking on the magnifying glass does not seem to do anything at all.

有幫助嗎?

more options

https://addons.mozilla.org/en-US/firefox/addon/contextual-search Context Search by Olivier de Broqueville, Carl Scheller

Search selected text using your preferred search engines. Right-click or Alt-click on selected text to respectively launch the context menu or the icons grid. You can also perform searches using keywords in the url address bar. Requires Firefox 62+.

有幫助嗎?

more options

I gave Context Search a try as it can do things I might someday use, but it does not seem to support "empty query searches" either.

It can search "query" on "Youtube", when I write "cs yt query" in the search bar, but when I write just "cs yt" it complains about wrong usage and falls back to opening a Google homepage.

Despite the plugin itself does not work for me - it brought me to an idea how to make the search bar work the way I prefer.

Instead of using multiple "search engines with shortcuts in FF" - I could use a custom "proxy search engine script" that can parse the query with a keyword and based on simple rules just open the page I want or forward the rest of the query to a real search engine.

As a nice side-effect it will be browser independent.

Thank you for your time and help, best regards, P.

有幫助嗎?

more options

That was very good work. Well Done. Please flag your last post as Solved Problem as this can help others with similar problems. Go to that post and click the 'Solved' button to its right.

有幫助嗎?

more options

Try to set the pref to '2':

  • browser.urlbar.update2.emptySearchBehavior = 2

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題