Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

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.

Всички отговори (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