X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

How can I remove the contentSearchSettingsButton from a new tab page?

Được đăng

If I open a new tab (firefox default) and start typing in the search box, suggestions and the "Change Search settings" box opens underneath, pressing enter sometimes gives me the about:preferences#search page. I don't need or want this feature but it seems that the default pages are protected, I can't use Stylus to remove the feature which is new for the past few months.

If I open a new tab (firefox default) and start typing in the search box, suggestions and the "Change Search settings" box opens underneath, pressing enter sometimes gives me the about:preferences#search page. I don't need or want this feature but it seems that the default pages are protected, I can't use Stylus to remove the feature which is new for the past few months.

Giải pháp được chọn

Oh, you're right. Firefox does appear to treat the home page and new tab page differently. In that case, change the CSS code to include the new tab:

@-moz-document url("about:home"), url("about:newtab") {  
     #contentSearchSettingsButton {
          display: none !important;
     }
}

That should work for you.

Đọc câu trả lời này trong ngữ cảnh 1
Trích dẫn

Chi tiết hệ thống bổ sung

Phần bổ trợ đã cài đặt

  • Shockwave Flash 32.0 r0

Ứng dụng

  • Chuỗi đại diện người dùng: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Thông tin chi tiết

Wesley Branton
  • Top 10 Contributor
637 giải pháp 5218 câu trả lời
Được đăng

Câu trả lời hữu ích

Firefox pages are indeed protected pages, along with some other Mozilla-operated websites. This means that add-ons can't modify them like they can on other pages.

You would hide this element using a userContent.css file (which is similar to a userChrome.css except that it modifies the content of pages instead of the Firefox interface.

In your Firefox profile folder, you will need to go to the chrome folder (you make need to make it) and create a file called userContent.css with the following code in it:

@-moz-document url("about:home") {  
     #contentSearchSettingsButton {
          display: none !important;
     }
}

Once you save the file and restart Firefox, you should see the change.

Hope this helps.

Firefox pages are indeed protected pages, along with some other Mozilla-operated websites. This means that add-ons can't modify them like they can on other pages. You would hide this element using a <code>userContent.css</code> file (which is similar to a <code>userChrome.css</code> except that it modifies the content of pages instead of the Firefox interface. In [[Profiles - Where Firefox stores your bookmarks, passwords and other user data|your Firefox profile folder]], you will need to go to the <code>chrome</code> folder (you make need to make it) and create a file called <code>userContent.css</code> with the following code in it: <pre><nowiki>@-moz-document url("about:home") { #contentSearchSettingsButton { display: none !important; } }</nowiki></pre> Once you save the file and restart Firefox, you should see the change. Hope this helps.
Bài viết này có hữu ích với bạn không? 1
Trích dẫn

Người tạo câu hỏi

Wesley, That's perfect, does what I wanted. Thanks a lot.

Wesley, That's perfect, does what I wanted. Thanks a lot.
Bài viết này có hữu ích với bạn không?
Trích dẫn

Người tạo câu hỏi

Actually, scrub that, it works on the home page but not on any new tab pages. FF treats a new tab as different to home page even though they are both set as Firefox Home (default). I can't see an equivalent to about:home for a new tab.

Actually, scrub that, it works on the home page but not on any new tab pages. FF treats a new tab as different to home page even though they are both set as Firefox Home (default). I can't see an equivalent to about:home for a new tab.
Bài viết này có hữu ích với bạn không?
Trích dẫn
Wesley Branton
  • Top 10 Contributor
637 giải pháp 5218 câu trả lời
Được đăng

Giải pháp được chọn

Oh, you're right. Firefox does appear to treat the home page and new tab page differently. In that case, change the CSS code to include the new tab:

@-moz-document url("about:home"), url("about:newtab") {  
     #contentSearchSettingsButton {
          display: none !important;
     }
}

That should work for you.

Oh, you're right. Firefox does appear to treat the home page and new tab page differently. In that case, change the CSS code to include the new tab: <pre><nowiki>@-moz-document url("about:home"), url("about:newtab") { #contentSearchSettingsButton { display: none !important; } }</nowiki></pre> That should work for you.
Bài viết này có hữu ích với bạn không? 1
Trích dẫn

Người tạo câu hỏi

That's it. thanks.

That's it. thanks.
Bài viết này có hữu ích với bạn không?
Trích dẫn
Wesley Branton
  • Top 10 Contributor
637 giải pháp 5218 câu trả lời
Được đăng

No problem. Glad I could help.

No problem. Glad I could help.
Bài viết này có hữu ích với bạn không?
Trích dẫn
Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.