brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
18.01k stars 2.36k forks source link

Feature Request: A permanent URL for the inner dashboard page #4100

Open gdh1995 opened 5 years ago

gdh1995 commented 5 years ago

Description

I'm an author of the Chrome extension "Vimium C". While my extension overrides the default newtab page (to make it configurable on my extension's options page), one user of Vimium C has asked me for re-enable the default dashboard as the new tab page: https://github.com/gdh1995/vimium-c/issues/28#issuecomment-482473420 .

After I searched in the source code of brave-core, I found it only maps the https://github.com/brave/brave-core/blob/master/components/brave_new_tab_ui/brave_new_tab.html to "chrome://newtab/". So the user's request is impossible up to now.

Considering that Chrome has a permanent inner page just looking like the default newtab page: chrome-search://local-ntp/local-ntp.html , I think the brave browser should also assign a URL for the beautiful dashboard page.

Steps to Reproduce

  1. install Vimium C on the brave browser
  2. open Vimium C's options page, and set "New tab URL" to "chrome-search://local-ntp/local-ntp.html"
  3. press "Ctrl+T", and then the brave opens the Chromium inner new tab page (ntp).

Actual result:

  1. but there's no URL pointing to the inner dashboard page
  2. if forcing Vimium C to set its "New tab URL" to "brave://newtab/", "Ctrl+T" will cause a dead loop

Expected result:

An extension can use a URL (like "brave://inner-newtab") to open the dashboard page, whether the new tab page is overridden / changed or not.

Brave version (brave://version info)

0.62.51 Chromium: 73.0.3683.103 (正式版本) (64 位)

e82a658d8159cabbd4938c1660f9bb00b4a82a23-refs/branch-heads/3683@{#902}

Windows 10 OS Build 17763.379

V8 7.3.492.27

Reproducible on current release:

Website problems only:

srirambv commented 5 years ago

cc: @jonathansampson

tony-scio commented 3 years ago

Same situation here.

I have an extension that allows the NTP override to be "disabled." Since the extension API doesn't provide a mechanism for this, in Chrome it works by redirecting to chrome-search://local-ntp/local-ntp.html. But in Brave, this results in the user being taken to the Google NTP instead of the Brave NTP like they expect.

I think fixing this is as easy as adding an entry here: https://github.com/brave/brave-core/blob/1cb5818aa0b70666c6aeea5ea9c06cc4e712171a/chromium_src/chrome/common/url_constants.cc

gdh1995 commented 3 years ago

BTW, Chrome 85+ has a new inner URL of chrome://new-tab-page/, and then this page allow extensions' content scripts to work on it, when the browser flag #extensions-on-chrome-urls is enabled .

vardhman-singh-glean commented 1 year ago

Bumping this up, Looks like brave://new-tab-page/ goes to the default chrome page and not the dashboard page, so its not the ideal solution as there's still no way to redirect the dashboard inner page using a url.

kirillzakharov commented 1 year ago

Bumping this up. Same issue here with Unsplash Instant.

Defaulting to chrome://new-tab-page/ for now.

jtbrown3 commented 1 year ago

Bumping this one. Would like to see: chrome-search://local-ntp/local-ntp.html supported in Brave and properly redirected to the Brave NTP. 👍