MCPcopy Create free account
hub / github.com/jhen0409/react-native-debugger / removeUnecessaryTabs

Function removeUnecessaryTabs

electron/devtools.js:39–58  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

37}
38
39export const removeUnecessaryTabs = (win) => {
40 if (
41 process.env.NODE_ENV === 'production'
42 && !process.env.DEBUG_RNDEBUGGER
43 && win.devToolsWebContents
44 ) {
45 return win.devToolsWebContents.executeJavaScript(`(() => {
46 const tabbedPane = UI.inspectorView.tabbedPane;
47 if (tabbedPane) {
48 tabbedPane.closeTab('elements');
49 tabbedPane.closeTab('security');
50 tabbedPane.closeTab('audits');
51 tabbedPane.closeTab('audits2');
52 tabbedPane.closeTab('lighthouse');
53
54 tabbedPane.leftToolbar().element.remove();
55 }
56 })()`)
57 }
58}
59
60export const activeTabs = (win) => {
61 if (win.devToolsWebContents) {

Callers 1

createWindowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected