Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle special URLs, avoid hard coding #473

Open
hanguokai opened this issue Oct 22, 2023 · 4 comments
Open

Handle special URLs, avoid hard coding #473

hanguokai opened this issue Oct 22, 2023 · 4 comments
Labels
discussion Needs further discussion enhancement Enhancement or change to an existing feature follow-up: chrome Needs a response from a Chrome representative follow-up: safari Needs a response from a Safari representative supportive: firefox Supportive from Firefox

Comments

@hanguokai
Copy link
Member

hanguokai commented Oct 22, 2023

In browsers, there are some common URLs that developers(users) want to open or detect. Currently developers can only hardcode these URLs. But different browsers may have significant differences.

The goal of this issue: It would be helpful if there was a consistent way to judge or open these URLs without hardcode.

This issue covers #470 which is just one of these special URLs.

Chrome Firefox Safari
New Tab Chrome
chrome://newtab/
Edge
edge://newtab/
Opera
chrome://startpageshared/
Vivaldi
chrome://vivaldi-webui/startpage
about:newtab favorites://
topsites:// (Legacy)
Homepage No URL No URL No URL
Default homepage No URL about:home No URL
Extensions management chrome://extensions/ about:addons No URL (In browser settings)
Extensions shortcuts chrome://extensions/shortcuts (for all) No independent URL (In about:addons) -
Extensions details chrome://extensions/?id=ext-id No independent URL (In about:addons) No URL (In browser settings)
Browser history chrome://history/ No URL (In a independent window) history://
Browser bookmarks chrome://bookmarks/ No URL (In a independent window) bookmarks://
Browser downloads chrome://downloads/ No URL (In a independent window) -
Browser settings chrome://settings/ about:preferences No URL (In a independent window)

Some use cases:

  • Determine whether a tab is a new tab page, or a bookmark page, etc.
  • Open the extension management page
  • Open this extension's details page for toggling "run in incognito mode", "site permissions", "allow access to file URL", etc.
  • Open shortcuts page for setting shortcuts.
  • Open browser history, browser download or browser settings page.

Another special case: the extension's store link or review link. Developers have recently discussed it. The link needs to be modified to a specific store link before each release. It is best that browsers support open this page (if the extension is not from a store like unpacked extensions or self hosted extensions, just ignore it or throw error).

To solve these problems, a flexible API is needed, and different browsers can support parts of functions.

@hanguokai hanguokai added enhancement Enhancement or change to an existing feature discussion Needs further discussion labels Oct 22, 2023
@fregante
Copy link

@dotproto
Copy link
Member

dotproto commented Oct 22, 2023

I've updated the table in the original issue description to include the user's current homepage and the browser's default homepage.

@Rob--W Rob--W added follow-up: chrome Needs a response from a Chrome representative supportive: firefox Supportive from Firefox follow-up: safari Needs a response from a Safari representative labels Nov 9, 2023
@Rob--W
Copy link
Member

Rob--W commented Nov 9, 2023

FYI in Firefox the meta-bug tracking requests related to opening special pages is at https://bugzilla.mozilla.org/show_bug.cgi?id=1269456

@carlosjeurissen
Copy link
Contributor

The ability to open the extension shortcuts page has been discussed here:
https://groups.google.com/a/chromium.org/g/extension-api-reviews/c/4Odm0D9FR_E

https://bugs.chromium.org/p/chromium/issues/detail?id=1173375

#126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Needs further discussion enhancement Enhancement or change to an existing feature follow-up: chrome Needs a response from a Chrome representative follow-up: safari Needs a response from a Safari representative supportive: firefox Supportive from Firefox
Projects
None yet
Development

No branches or pull requests

5 participants