chrome-devtools-mcp-for-extension 0.23.4 → 0.23.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/login-helper.js +13 -0
- package/package.json +1 -1
|
@@ -69,15 +69,28 @@ export async function getGeminiStatus(page) {
|
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
71
|
const profileFound = await page.evaluate((patterns) => {
|
|
72
|
+
// Method 1: Check aria-label attribute
|
|
72
73
|
for (const pattern of patterns) {
|
|
73
74
|
if (document.querySelector(`button[aria-label*="${pattern}"]`)) {
|
|
74
75
|
return true;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
// Method 2: Check button text content (Gemini may not use aria-label)
|
|
79
|
+
const buttons = Array.from(document.querySelectorAll('button'));
|
|
80
|
+
for (const pattern of patterns) {
|
|
81
|
+
const found = buttons.some(btn => btn.textContent?.includes(pattern));
|
|
82
|
+
if (found) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
// Fallback: check for nav with chat history (logged-in indicator)
|
|
78
87
|
if (document.querySelector('nav[aria-label*="Recent"]')) {
|
|
79
88
|
return true;
|
|
80
89
|
}
|
|
90
|
+
// Fallback: check for textbox (user is on main chat page)
|
|
91
|
+
if (document.querySelector('[role="textbox"]')) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
81
94
|
return false;
|
|
82
95
|
}, GEMINI_PROFILE_PATTERNS);
|
|
83
96
|
console.error(`[login-helper] Gemini ARIA check: ${profileFound ? 'LOGGED_IN' : 'NEEDS_LOGIN'}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.5",
|
|
4
4
|
"description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./scripts/cli.mjs",
|