Skip to content

Instantly share code, notes, and snippets.

@jacekkopecky
Last active September 27, 2017 17:22
Show Gist options
  • Save jacekkopecky/410872d6fee9b7632e7a5cafade4f199 to your computer and use it in GitHub Desktop.
Save jacekkopecky/410872d6fee9b7632e7a5cafade4f199 to your computer and use it in GitHub Desktop.
Custom new tab page in Chrome

Issue

Chrome v61 broke the New Tab Redirect extension slightly:

  • Before v61, a new tab would redirect to the desired page, put cursor in the address bar, and select the whole URL (screenshot 1). You start typing, the selection is replaced, only what you typed remains, plus any autocomplete suggestions (screenshot 2). Normally, I just need to type n, chrome knows I mean Netflix, suggests that, and I can press Enter.
  • With v61, a new tab redirects to the desired page, the cursor is in the address bar, but the whole URL is not selected (screenshot 3). If you start typing, what you type gets prepended to the URI (screenshot 4). I type n, I have nfile:///home/jacek/start.html with the cursor after n. The extra keystrokes to get rid of the URL are annoying.

Workaround

Until Chrome is fixed (if it ever is), here's my workaround: put start.html into my own extension.

  1. download jimschubert/duckduckgo-newtab
  2. replace duckduckgo-newtab/override.html with a copy of (or symlink to) /home/jacek/start.html
    • if you have Javascript in there, it must be in a separate file, or else it won't work
  3. (optional) edit name and description in manifest.json to something like "my new tab page" and "override the new tab page"
  4. navigate to chrome://extensions/
  5. check Developer mode
  6. click Load Unpacked Extension...
  7. select the duckduckgo-newtab directory from step 1
  8. uncheck Developer mode

Now a new tab will show no URL whatsoever, ready for you to start typing (screenshot 5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment