为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How can I add a predefined text to a search ?

more options

Hi everybody,

I recently switch to firefox from chrome. And I like it very much, but there is one feature I missed that I can find in Firefox :

In chrome you can add custom search engine with %s is the text from the search you just typed. Example : I type "php test" in the adress bar and it's like I search google with "filetype:php test".

I don't know If I've been clear enough, feel free to ask me anything.

Thanks for your help !

Hi everybody, I recently switch to firefox from chrome. And I like it very much, but there is one feature I missed that I can find in Firefox : In chrome you can add custom search engine with %s is the text from the search you just typed. Example : I type "php test" in the adress bar and it's like I search google with "filetype:php test". I don't know If I've been clear enough, feel free to ask me anything. Thanks for your help !

所有回复 (2)

more options

Go to your search bar. Do you see the down arrow? Click it. This is the search engine. You will see a list of all the engines that you have. On the bottom is the Manage Search Engines. This is where you can make changes in your preference order of the engines, as well as setting a Key for each engine.

I would like to recommend;

Add to Search Bar
Make any pages' search functionality available in the Search Bar (or "search box")

Context Search
Expands the context menu's 'Search for' item into a list of installed search engines, allowing you to choose the engine you want to use for each search.

more options

I haven't used that feature in Google Chrome. In Firefox, you can create a search plugin with additional/custom features, but as far as I know, it takes some manual editing to do it.

For example, you can open this folder:

C:\Program Files (x86)\Mozilla Firefox\browser\searchplugins

and make a copy of google.xml for example as google-filetype.xml

then edit the contents of the file in a text editor. For example, where you see:

<Param name="q" value="{searchTerms}" /> 

you could try:

<Param name="q" value="filetype:{searchTerms}" /> 

(I haven't tested it.)

Also would be good to update the Short Name so you can tell it apart from regular Google search.

I suggest making a backup outside that folder (in case it gets replaced at the next Firefox update).

I'm sure there's a better way to install the custom plugin to the regular folder for personally installed search plugins, but I'm not familiar with it. Hopefully another volunteer will have a simpler/more concrete solution.

By the way, if you think a particular custom search plugin should already exist, it's worth checking this site as there are numerous plugins available for Google (and other sites) already: http://mycroftproject.com/google-search-plugins.html