jimschubert/NewTab-Redirect

New Tab Data URI

Closed this issue · 1 comments

This is not working for me with the uri data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==
if you open that itself, you simply see a black screen, but New Tab Redirect breaks on it. This doesnt work with the example uri from the pull request either. v 3.1.4

It looks like data URIs can't properly be supported. chrome.tabs.update prepends http:// along with the URI for the extension when I use "Always use Tab Update" and a data uri. This is out of my control. The pure HTTP redirect method using document.location.href is blocked by major browsers to prevent phishing.

Since this can't be done programmatically, you'll have to resort to meta tag.

I have an example repo that points to duckduckgo: https://github.com/jimschubert/duckduckgo-newtab

  1. Clone the repo
  2. change the url in override.html, also change the name in manifest.json to whatever you like
  3. go to chrome://extensions
  4. Check 'Developer mode'
  5. Click "Load Unpacked Extension"
  6. Point to the repo download location

Sorry I don't have a workaround for doing this in New Tab Redirect, but it is browser and Chrome Extension API limitations.