chrome-devtools-mcp-for-extension 0.18.9 → 0.18.10
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/browser.js +0 -35
- package/package.json +1 -1
package/build/src/browser.js
CHANGED
|
@@ -656,41 +656,6 @@ export async function launch(options) {
|
|
|
656
656
|
});
|
|
657
657
|
console.error('Applied navigator.webdriver bypass to existing page');
|
|
658
658
|
}
|
|
659
|
-
// Verify extensions were loaded by checking chrome://extensions/
|
|
660
|
-
if (extensionPaths.length > 0) {
|
|
661
|
-
console.error('🔍 Verifying extension loading...');
|
|
662
|
-
try {
|
|
663
|
-
const pages = await browser.pages();
|
|
664
|
-
const page = pages[0] || await browser.newPage();
|
|
665
|
-
// Add a small delay to ensure Chrome is fully started
|
|
666
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
667
|
-
await page.goto('chrome://extensions/', { waitUntil: 'networkidle0' });
|
|
668
|
-
const loadedExtensions = await page.evaluate(() => {
|
|
669
|
-
const extensionCards = document.querySelectorAll('extensions-item');
|
|
670
|
-
const results = [];
|
|
671
|
-
Array.from(extensionCards).forEach(card => {
|
|
672
|
-
const shadowRoot = card.shadowRoot;
|
|
673
|
-
if (shadowRoot) {
|
|
674
|
-
const name = shadowRoot.querySelector('#name')?.textContent?.trim() || 'Unknown';
|
|
675
|
-
const enabled = !shadowRoot.querySelector('#enable-toggle')?.hasAttribute('disabled');
|
|
676
|
-
const id = card.getAttribute('id') || 'unknown';
|
|
677
|
-
results.push({ name, id, enabled });
|
|
678
|
-
}
|
|
679
|
-
});
|
|
680
|
-
return results;
|
|
681
|
-
});
|
|
682
|
-
console.error(`✅ Extensions verification complete. Found ${loadedExtensions.length} extensions:`);
|
|
683
|
-
loadedExtensions.forEach((ext, index) => {
|
|
684
|
-
console.error(` ${index + 1}. ${ext.name} (${ext.enabled ? 'enabled' : 'disabled'}) - ID: ${ext.id}`);
|
|
685
|
-
});
|
|
686
|
-
if (loadedExtensions.length === 0) {
|
|
687
|
-
console.error('⚠️ No extensions found in chrome://extensions/ - this may indicate loading failure');
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
catch (verificationError) {
|
|
691
|
-
console.error(`⚠️ Extension verification failed: ${verificationError}`);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
659
|
return browser;
|
|
695
660
|
}
|
|
696
661
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.10",
|
|
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",
|