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

搜索 | 用户支持

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

详细了解

How can I search the current site in firefox 57?

  • 4 个回答
  • 6 人有此问题
  • 2 次查看
  • 最后回复者为 Shadow110

more options

I'm trying to find out how to find a term by searching the entirety of the current website. I know how to search the current page. I need to know how to search the site. The FF 57 tutorial page, "Find It Faster", shows the address bar with a magnifying glass over a heart. I presume I am to click the heart for a site search but my FF 57 has no such heart. I don't want to have to type in a whole bunch of stuff (website URL) in order to do a site search. The tutorial page mentions one-off searches but I don't understand that. Help!

I'm trying to find out how to find a term by searching the entirety of the current website. I know how to search the current page. I need to know how to search the site. The FF 57 tutorial page, "Find It Faster", shows the address bar with a magnifying glass over a heart. I presume I am to click the heart for a site search but my FF 57 has no such heart. I don't want to have to type in a whole bunch of stuff (website URL) in order to do a site search. The tutorial page mentions one-off searches but I don't understand that. Help!

被采纳的解决方案

I don't think there is a built-in feature for this.

Many sites have a site-specific search feature (like this site), but it may use a different syntax or be less powerful than web search engines like Google and Bing. To use a site's search engine, you can enter your query into its search box.

To run a search on a general web search engine that is targeted at a particular site, you can add, for example, site:example.com to your query. I understand you do not want to type that yourself, and neither do I! So...

I created a bookmarklet to load a new tab with a Google search targeting the current site. Here's how you set that up, and then to use it, you just click it.

(1) Select and copy this entire script (ignore the fact that the forum "linkifies" the URL):

javascript:var kw=prompt("Enter keywords or 0 to cancel", "");if(kw){if(kw!="0"){var u="https://www.google.com/search?q=site%3A"+window.location.hostname;if(kw.length>0)u+="+"+encodeURIComponent(kw); window.open(u,"_blank");}} void 0;

(2) Right-click a convenient spot on your Bookmarks Toolbar or Bookmarks Menu and choose New Bookmark (note: this doesn't work on the new Library menu).

(3) Paste the script into the Location field, then in the Name field, you can enter SiteSrch or whatever you find useful.

(4) Click the Add button to save the bookmarklet. Setup is done.

When you click the button, it should display a small box to enter query terms to run against the current site. Firefox won't run a bookmarklet on a site with a strict Content Security Policy, so this will not work on some sites.

What do you think?

定位到答案原位置 👍 5

所有回复 (4)

more options

Google supports the site:<website> syntax to search within a specific domain.

more options

选择的解决方案

I don't think there is a built-in feature for this.

Many sites have a site-specific search feature (like this site), but it may use a different syntax or be less powerful than web search engines like Google and Bing. To use a site's search engine, you can enter your query into its search box.

To run a search on a general web search engine that is targeted at a particular site, you can add, for example, site:example.com to your query. I understand you do not want to type that yourself, and neither do I! So...

I created a bookmarklet to load a new tab with a Google search targeting the current site. Here's how you set that up, and then to use it, you just click it.

(1) Select and copy this entire script (ignore the fact that the forum "linkifies" the URL):

javascript:var kw=prompt("Enter keywords or 0 to cancel", "");if(kw){if(kw!="0"){var u="https://www.google.com/search?q=site%3A"+window.location.hostname;if(kw.length>0)u+="+"+encodeURIComponent(kw); window.open(u,"_blank");}} void 0;

(2) Right-click a convenient spot on your Bookmarks Toolbar or Bookmarks Menu and choose New Bookmark (note: this doesn't work on the new Library menu).

(3) Paste the script into the Location field, then in the Name field, you can enter SiteSrch or whatever you find useful.

(4) Click the Add button to save the bookmarklet. Setup is done.

When you click the button, it should display a small box to enter query terms to run against the current site. Firefox won't run a bookmarklet on a site with a strict Content Security Policy, so this will not work on some sites.

What do you think?

more options

cor-el: Thanks for the try but the link took me to some esoteric Google help page with about 100 options regarding searches but I could see no way to get to topic=3378866 and none of the options presented seemed to address my problem.

jscher2000: I tried what you suggested and it worked. I used to use GooglebarLite as my search tool and it simply had a button you could click. But it's not compatible with FF57. Now I have to click three buttons but that's way better than typing the website url every time. Very grateful. Thanks again. OlWill

more options

Hello,

I am glad to hear that your problem has been resolved. If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution more easily. Thank you for contacting Mozilla Support.