Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

How do I change the browser address bar upon opening a new tab?

more options

I am writing an extension based on NewTab Override. I would like to know if there is a way to set the browser address bar to have no text when focused, and if so how to do that. So far I am using the code from NewTab Override that does: ``` browser.tabs.update(tabId, { url : url, loadReplace : true }, () => {}); ``` But I don't know any function or property to set for the address bar. I looked in the developer page for Mozilla Firefox but couldn't find anything.

I am writing an extension based on NewTab Override. I would like to know if there is a way to set the browser address bar to have no text when focused, and if so how to do that. So far I am using the code from NewTab Override that does: ``` browser.tabs.update(tabId, { url : url, loadReplace : true }, () => {}); ``` But I don't know any function or property to set for the address bar. I looked in the developer page for Mozilla Firefox but couldn't find anything.

Tất cả các câu trả lời (2)

more options

I found https://searchfox.org/mozilla-central/source/browser/components/extensions/schemas/urlbar.json But I don't know how to use it. It seems to exist in current builds of Firefox but I cannot seem to figure out how to add the urlbar permission without it saying it cannot find it.

more options

Hi Nick, I don't think extensions can change Firefox's behavior for when it shows a URL in the address bar. However, another place to check would be the add-on developer forum:

https://discourse.mozilla.org/c/add-ons/development