jimschubert / NewTab-Redirect

NewTab Redirect! is an extension for Google Chrome which allows the user to replace the page displayed when creating a new tab.
MIT License
483 stars 89 forks source link

redirect is too slow and overwrites existing URLs as a result #114

Closed modelm closed 8 years ago

modelm commented 8 years ago

I wanted a blank new tab page, so I installed this extension and set my new tab page to "about:blank".

I have noticed that frequently I have a URL in my clipboard when opening a new tab, and I hit cmd-t followed by cmd-v followed by enter in rapid succession. Then I watch as the extension kicks in and overwrites the URL I've just entered with "about:blank" and loads the empty page.

I have to re-focus the address bar and re-enter the URL at this point to get where I was initially trying to go.

It would be great if the delay could be removed entirely, or failing that if the extension could somehow recognize that there is already a URL in the address bar and not act in that case.

Hrxn commented 8 years ago

I'm not sure if this helps, but you should be able to do something like this

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

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

In an extension manifest file.

That would be some sort of 'static redirection', if you will.

Source: https://developer.chrome.com/extensions/override

modelm commented 8 years ago

For anybody else who has this issue, I found another extension that does the job:

https://chrome.google.com/webstore/detail/empty-new-tab-page/dpjamkmjmigaoobjbekmfgabipmfilij/related

dbkaplun commented 8 years ago

+1

@Hrxn looks like it's already using this API: https://github.com/jimschubert/NewTab-Redirect/blob/7089a1c8b3dba8b25e00abd97da58fa201f7f246/manifest.json#L13

dbkaplun commented 8 years ago

One possible solution is to use an