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

搜尋 Mozilla 技術支援網站

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

了解更多

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.