Giter VIP home page Giter VIP logo

Comments (4)

mumbleskates avatar mumbleskates commented on August 22, 2024

+1, this is the big minus to using this extension. Being able to hit Ctrl+T to bring up a new tab and instantly start typing a search term or URL is a major functionality to lose; having to also hit Alt+D, F6, or Ctrl+L to highlight the omnibox/address bar is a big pain.

from newtab-redirect.

benkaiser avatar benkaiser commented on August 22, 2024

+1 from me also. I might write a pull-request to fix this. It would be as simple as setting window.location = '' in javascript (to wipe the omnibar) or Simulating a Ctrl+L as @dpashkevich suggested to perhaps highlight the url.

I guess this becomes tricky as this extension isn't actually the new tab page, it just redirects to it and therefore cannot run content on it. However a solution may be to add the permissions for this extension to run a content-script on every page and check if the url matches the new tab page url and perform one of the above two page options.

from newtab-redirect.

jimschubert avatar jimschubert commented on August 22, 2024

This isn't possible (either the highlighting of the omnibar or removal of the contents). I would absolutely never add the content script permissions to this extension. Even if I did, there would be a large number of users out of the nearly 1 million that use the extension daily that would not want this functionality (or the extra permissions).

Simulating CTRL+L is also not possible. Chrome is far too secure to allow some extension to run in the background and allow for simulated keypresses to interact with the browser's chrome or omnibar in any way.

If this is too much of a pain, unfortunately you'll need to find another extension. The architecture of this extension makes what you want impossible unless the Chrome team adds omnibar modification support. That's something I highly doubt will ever happen.

You can however create your own new tab page and set the location manually. I've detailed the steps in issue #4 The only problem with that route is that you can't easily modify the redirected location.

from newtab-redirect.

benkaiser avatar benkaiser commented on August 22, 2024

@jimschubert it appears it is impossible anyway. I first tried to see if you can run a content script on a chrome:// prefixed url... turns out you can't.

Second idea I had was to make my own new tab page and then iframe the chrome new tab page then empty the address bar. However this did not work as

  • you cannot empty the omnibar via javascript (window.location = '' simply reloads the page)
  • chrome:// prefixed urls cannot be opened in an iframe.

from newtab-redirect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.