1

I want to create a new tab in google chrome with my extension:

chrome.tabs.create({'url': chrome.extension.getURL('page.html')}, function(page) {

   // other code

});

But when new page is created the URL looks bad for me, like

chrome-extension://dfdnfdnfjdnkdfndfdf/page.html

How to create new tab with empty URL ?

I saw other extensions doing similar

1 Answers1

1

You are looking for a New Tab Override Page.

Alternatively, you could try manipulating the window.location.hash directly from your content script, using methods described here.

Community
  • 1
  • 1
hiattp
  • 2,316
  • 1
  • 18
  • 23
  • Not exactly same. I want to create a new tab when extension browser action icon is clicked. –  Nov 05 '13 at 16:43
  • I added an update, but in general changing the url so that it doesn't reflect the actual content source can cause problems/confusion. – hiattp Nov 05 '13 at 17:02