MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / createPanelIfHasDocs

Function createPanelIfHasDocs

src/core/devtool.ts:7–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5let checkCount = 0;
6
7const createPanelIfHasDocs = () => {
8 if (created || checkCount++ > 10) {
9 return;
10 }
11 // 根据全局变量 window.T_SHEET 判断是否是在腾讯文档页面
12 chrome.devtools.inspectedWindow.eval('!!(window.T_SHEET)', (hasDocs) => {
13 if (!hasDocs || created) {
14 return;
15 }
16 clearInterval(checkDocsInterval);
17 created = true;
18 createPanels();
19 });
20};
21// 在控制台创建调试面板 Tencent Docs Dev Tools
22const createPanels = () => {
23 // alert(created);

Callers 1

devtool.tsFile · 0.85

Calls 1

createPanelsFunction · 0.85

Tested by

no test coverage detected