Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 62a1e2c

Browse files
committed
move chrome + plain shells over to the unified panel
1 parent fc987c8 commit 62a1e2c

File tree

9 files changed

+10
-516
lines changed

9 files changed

+10
-516
lines changed
File renamed without changes.

shells/chrome/src/panel.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
'use strict';
1212

13-
var checkForReact = require('./panel/checkForReact');
14-
var inject = require('./panel/inject');
13+
var checkForReact = require('./checkForReact');
14+
var inject = require('./inject');
1515

1616
type Listenable = {
1717
addListener: (fn: (message: Object) => void) => void,
@@ -63,6 +63,8 @@ var config = {
6363
}, 100);
6464
},
6565
showComponentSource(vbl) {
66+
// if it is an es6 class-based component, (isMounted throws), then inspect
67+
// the constructor. Otherwise, inspect the render function.
6668
var code = `Object.getOwnPropertyDescriptor(window.${vbl}.__proto__.__proto__, 'isMounted') &&
6769
Object.getOwnPropertyDescriptor(window.${vbl}.__proto__.__proto__, 'isMounted').value ?
6870
inspect(window.${vbl}.render) : inspect(window.${vbl}.constructor)`;
@@ -119,7 +121,7 @@ var config = {
119121

120122
var globalHook = require('../../../backend/GlobalHook');
121123
globalHook(window);
122-
var Panel = require('../../../frontend/magic');
124+
var Panel = require('../../../frontend/Panel');
123125
var React = require('react');
124126

125127
var node = document.getElementById('container');

shells/chrome/src/panel/Panel.js

Lines changed: 0 additions & 328 deletions
This file was deleted.

shells/chrome/src/panel/run.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

shells/chrome/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
background: './src/background.js',
1818
inject: './src/GlobalHook.js',
1919
contentScript: './src/contentScript.js',
20-
panel: './src/panel/run.js',
20+
panel: './src/panel.js',
2121
},
2222
output: {
2323
path: __dirname + '/build', // eslint-disable-line no-path-concat

0 commit comments

Comments
 (0)