angular/devtools/projects/shell-browser/src/devtools.ts
Matthieu Riegler 4fe0ac5a87 refactor(devtools): themed devtool tab icons for firefox (#64122)
With this change, Firefox get a different tab icon when the dark theme is enabled

fixes #52980

PR Close #64122
2025-09-29 09:31:03 -04:00

17 lines
515 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
/// <reference types="chrome"/>
const theme = chrome.devtools.panels.themeName;
chrome.devtools.panels.create(
'Angular',
// Firefox specifically displays the icon in the tab.
// the bw icon wasn't visible in dark mode
theme === 'dark' ? 'assets/icon16.png' : 'assets/icon-bw16.png',
'index.html',
);