為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

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

了解更多

How to remove first search suggestion?

  • 6 回覆
  • 2 有這個問題
  • 1 次檢視
  • 最近回覆由 Shadow110

more options

Hello

I've been looking around and I couldn't find anything that would help. So, the problem is with the search suggestions. I can delete every suggestion except for the first one (with the "-- open site" text). I've tried shift+del, ctrl+del, hovering mouse over that suggestion, moving highlight with the cursors, etc. with no luck. I know that I can remove urls from the history and I've tried that. It's somewhat working, because I had to delete multiple urls several times.

So, the question is, how to remove first suggestion on the list without the need to dig out through the history?

Hello I've been looking around and I couldn't find anything that would help. So, the problem is with the search suggestions. I can delete every suggestion except for the first one (with the "-- open site" text). I've tried shift+del, ctrl+del, hovering mouse over that suggestion, moving highlight with the cursors, etc. with no luck. I know that I can remove urls from the history and I've tried that. It's somewhat working, because I had to delete multiple urls several times. So, the question is, how to remove first suggestion on the list without the need to dig out through the history?

所有回覆 (6)

more options

press backspace

more options

That is a default suggestion that you can't remove this via built-in means.

Add code to the userChrome.css file below the default @namespace line.


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

/* Remove " - Visit" or " - Search with" bar in the drop-down */
#PopupAutoCompleteRichResult richlistitem:first-of-type[actiontype="searchengine"],
#PopupAutoCompleteRichResult richlistitem:first-of-type[actiontype="visiturl"],
#PopupAutoCompleteRichResult richlistitem:first-of-type[actiontype="keyword"] {display:none !important;}

  • create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • use a plain text editor like Notepad to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • paste the code in the userChrome.css file in the editor window
  • make sure that the userChrome.css file starts with the default @namespace line
  • make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.
    otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

This will hide every first suggestion, won't it?

Well .. in that case, maybe there's other way to deal with this? Firefox is using sqlite database, right? So, if I'd edit this database and change priority/score/whatever column, then I could get rid out of those unneeded suggestions?

more options

This will only hide the special suggestion that Firefox shows as the first item. That are items that start with Search or Visit depending what Firefox thinks applies. All other suggestions that are coming from the setting in "Options/Preferences -> Content" are still shown. If you want to keep either of the suggestions that are hidden by this code then remove the corresponding line or comment the line out by placing it in a comment block (/* comment */).

more options

Don't get me wrong. Hiding is an option, but I don't like to use methods that only covers the main problem.

So, everything boils down to the places.sqlite and moz_hosts / moz_places. It looks like moz_hosts are being used by the suggestion, but all the statistics are being done on the moz_places table. Fine. One thing that bothers me is that: the page I'd like to get as first suggestion has got 200 visits and 4800 frecency. The "wrong suggestion" has got 3 visits and 6000 frecency. How come? Is there a formula for this value specified somewhere on mozilla support website?

Anyway, right now the only way to make sure that the proper page will be suggested as first option is to multiply visits by 10 (or so). This way recency will get higher that the other urls starting with the typed letters.

由 januzi 於 修改

more options

There is a Extension called Fat-Free Firefox See if that does what you would like.

Please let us know if this solved your issue or if need further assistance.