forked from mirrors/gecko-dev
Bug 1877838: Add URLs to tab preview cards for about: pages r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D211287
This commit is contained in:
parent
e7fd7f8a7c
commit
03a3324687
1 changed files with 3 additions and 0 deletions
|
|
@ -50,6 +50,9 @@ export default class TabHoverPreviewPanel {
|
|||
getPrettyURI(uri) {
|
||||
try {
|
||||
const url = new URL(uri);
|
||||
if (url.protocol === "about:") {
|
||||
return url.href;
|
||||
}
|
||||
return `${url.hostname}`.replace(/^w{3}\./, "");
|
||||
} catch {
|
||||
return uri;
|
||||
|
|
|
|||
Loading…
Reference in a new issue