# Jobko Browser Extension

Chrome extension for importing LinkedIn profiles and analyzing jobs directly on LinkedIn.

## Features

- **Profile Import**: Visit your LinkedIn profile and click "Import to Jobko" to automatically extract and import your profile data
- **Job Analysis**: On any LinkedIn job posting, click "Analyze with JobKO" to get instant match analysis

## Installation (Development)

1. Open Chrome and go to `chrome://extensions/`
2. Enable "Developer mode" (toggle in top right)
3. Click "Load unpacked"
4. Select the `browser-extension` folder

## Icons

Before loading, you need to create icon files. You can use any 16x16, 48x48, and 128x128 PNG images, or generate them:

```bash
# Using ImageMagick (install with: apt install imagemagick)
# Create simple purple circle icons
convert -size 16x16 xc:none -fill '#6366f1' -draw 'circle 8,8 8,1' icons/icon16.png
convert -size 48x48 xc:none -fill '#6366f1' -draw 'circle 24,24 24,3' icons/icon48.png
convert -size 128x128 xc:none -fill '#6366f1' -draw 'circle 64,64 64,8' icons/icon128.png
```

Or use any icon editor to create simple icons.

## Authentication

The extension needs to be connected to your Jobko account:

1. Log in to [jobko.ai](https://jobko.ai)
2. The extension will automatically detect your session
3. Alternatively, click the extension icon and log in from the popup

## Usage

### Import LinkedIn Profile

1. Go to your LinkedIn profile page (`linkedin.com/in/yourname`)
2. A purple "Import to Jobko" button appears at the bottom right
3. Click it to extract and import your profile
4. Your skills, experience, and languages will be imported to Jobko

### Analyze Job Postings

1. Open any LinkedIn job posting (`linkedin.com/jobs/view/...`)
2. A purple "Analyze with JobKO" button appears at the bottom right
3. Click it to analyze the job against your profile
4. See match score, verdict (APPLY/MAYBE/SKIP), matching/missing skills, and red flags

## API Endpoints Used

- `POST /api/profile/import-linkedin` - Import LinkedIn profile data
- `POST /api/jobs/analyze-external` - Analyze job from external source

## Development

### Files

- `manifest.json` - Extension configuration
- `background.js` - Service worker for API calls
- `content-profile.js` - Content script for LinkedIn profile pages
- `content-job.js` - Content script for LinkedIn job pages
- `content.css` - Styles for injected UI
- `popup.html/js` - Extension popup UI

### Testing

1. Load the extension in Chrome (Developer mode)
2. Open the browser console (F12) to see logs
3. Visit LinkedIn to test the functionality
