mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2026-02-21 14:40:32 +03:00
* window.bundle.js seems to work * minify * Use API instead of CLI * Add remote bundle * Perform code-splitting * Add background and stop code-splitting * Add other entrypoints * Flesh out some more * Keep going * Copy to browser directories * Ignore import type error * Strip out webpack stuff * Remove todos * Remove pug imports * Fix
18 lines
429 B
TypeScript
18 lines
429 B
TypeScript
function createPanel(url: string) {
|
|
chrome.devtools.panels.create(
|
|
'Redux',
|
|
'img/logo/scalable.png',
|
|
url,
|
|
function () {},
|
|
);
|
|
}
|
|
|
|
if (chrome.runtime.getBackgroundPage) {
|
|
// Check if the background page's object is accessible (not in incognito)
|
|
chrome.runtime.getBackgroundPage((background) => {
|
|
createPanel(background ? 'window.html' : 'devpanel.html');
|
|
});
|
|
} else {
|
|
createPanel('devpanel.html');
|
|
}
|