diff --git a/README.md b/README.md index 4b343bf..a894cf6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@
[![Stars](https://img.shields.io/github/stars/AhmedV20/codemind?style=social)](https://github.com/AhmedV20/codemind/stargazers) -[![Version](https://img.shields.io/badge/version-1.2.0-blue)](https://github.com/AhmedV20/codemind/releases) +[![Version](https://img.shields.io/badge/version-1.2.1-blue)](https://github.com/AhmedV20/codemind/releases) [![Build](https://img.shields.io/github/actions/workflow/status/AhmedV20/codemind/ci.yml?label=CI/Build)](https://github.com/AhmedV20/codemind/actions) [![Privacy](https://img.shields.io/badge/Privacy-Protected-green)](PRIVACY.md) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) @@ -100,6 +100,11 @@ CodeMind is a powerful browser extension that uses AI to instantly understand an | **Claude** | ❌ Paid | Anthropic's Claude models | | **HuggingFace** | ✅ Yes | Open-source models | +### v1.2.1 Highlights +- 🌐 **Edge Browser Support** — Fixed extension not working on Microsoft Edge +- ⏱️ **Improved Timing** — Increased injection timeout for slower browsers +- 🔍 **URL Fallback** — Added URL pattern validation for better reliability + ### v1.2.0 Highlights - 🤖 **OpenAI Support** — GPT-4o integration with streaming - 📂 **Analyzed Files Dropdown** — See which files were analyzed with glow animation diff --git a/package.json b/package.json index af8108d..0f1ce13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codemind", - "version": "1.2.0", + "version": "1.2.1", "description": "AI-Powered Repository Analyzer for GitHub", "type": "module", "scripts": { diff --git a/public/manifest.json b/public/manifest.json index 5889bfe..3984ab6 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "CodeMind - AI Repository Analyzer", - "version": "1.2.0", + "version": "1.2.1", "description": "Understand any GitHub repository in seconds with AI-powered analysis.", "icons": { "16": "icons/icon16.png", diff --git a/src/content/index.tsx b/src/content/index.tsx index c9401c5..f134980 100644 --- a/src/content/index.tsx +++ b/src/content/index.tsx @@ -5,7 +5,7 @@ import './styles/global.css'; import { scrapeRepositoryMetadata, scrapeDefaultBranch } from './utils/domScraper'; // Configuration -const INJECTION_TIMEOUT = 500; +const INJECTION_TIMEOUT = 1000; const BUTTON_CONTAINER_ID = 'github-ai-analyzer-root'; // Check if we're on a valid GitHub repository page @@ -24,7 +24,25 @@ function isRepositoryPage(): boolean { document.querySelector('.UnderlineNav-item') || document.querySelector('.reponav-item'); - return !!repoNav; + // If DOM check fails, fall back to URL pattern validation (fixes Edge timing issue) + if (!repoNav) { + // URL pattern: github.com/owner/repo or github.com/owner/repo/... + // Third path segment should not be a known GitHub route + const knownGitHubRoutes = ['tree', 'blob', 'edit', 'commits', 'pulls', 'issues', 'actions', 'projects', 'wiki', 'security', 'insights', 'settings', 'new', 'pull', 'blame', 'compare']; + const thirdSegmentIsRoute = pathParts.length > 2 && knownGitHubRoutes.includes(pathParts[2]); + + // If we have exactly 2 segments (owner/repo) or third segment is not a known route, it's a repo + const isValidRepoUrl = pathParts.length === 2 || (pathParts.length > 2 && !thirdSegmentIsRoute); + + if (isValidRepoUrl) { + console.log('[CodeMind] DOM nav not found, but URL matches repo pattern, proceeding'); + return true; + } + + return false; + } + + return true; } // Extract repository information from the page URL and DOM