Google Extension Edit Address Bar Content

Viewed 119

I have built a Chrome extension that edits the new tab page by replacing it with the index.html of my site. The only problem is that the address bar shows https://example.com/index.html/. How can I make the address bar blank, or edit it to something like Search here?

I tried to edit my site's code such that on page load, the text is edited, but it changes to https://example.com/search-here.html/.

Is there any Chrome extensions permission/property I can use, or some other thing I can do on the server end?

Thank you:)

1 Answers

It seems like you need to register an override page in the extension manifest.

Override pages are a way to substitute an HTML file from your extension for a page that Google Chrome normally provides. In addition to HTML, an override page usually has CSS and JavaScript code.

Here’s an example from the docs:

{
  "name": "My extension",
  ...

  "chrome_url_overrides" : {
    "pageToOverride": "myPage.html"
  },
  ...
}

For pageToOverride, substitute one of the following:

  • bookmarks
  • history
  • newtab
Related