SCOPEOut

SCOPEOut Icon

SCOPEOut

An extension that generates custom cover letters for UBC Co-op jobs in a single click, including SCOPE, PD Portal, and more!

Chrome Extension JavaScript Gemini API License: GPL v3

Check it out! SCOPEOut on Chrome Web Store

πŸ“‘ Table of Contents

πŸ‘€ App Preview

SCOPEOut Popup SCOPEOut Prompt Editor Page
SCOPEOut Generated Cover Letter

✨ Features

πŸ› οΈ Tech Stack

Layer Technology
Extension platform Chrome Extensions Manifest V3
Language Vanilla JavaScript (ES Modules)
AI backend Google Gemini API

πŸ“ Project Structure

SCOPEOut/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ manifest.json               # Extension manifest (MV3)
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ scope_out_icon_128.png      # 128x128 Extension icon
β”‚   β”‚   β”œβ”€β”€ scope_out_icon_2048.png      # Full resolution extension icon
β”‚   β”‚   └── science_coop_footer.png # Footer image used in the cover letter preview
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ gemini.js               # Gemini API client: builds prompt & calls generateContent
β”‚   β”‚   └── default-prompt.js       # Default cover letter prompt template with placeholders
β”‚   β”œβ”€β”€ background/
β”‚   β”‚   └── service-worker.js       # MV3 service worker: orchestrates scraping, generation & preview
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   └── scraper.js              # Content script injected into job posting pages to extract job data
β”‚   β”œβ”€β”€ popup/
β”‚   β”‚   β”œβ”€β”€ popup.html              # Extension popup UI
β”‚   β”‚   β”œβ”€β”€ popup.css
β”‚   β”‚   └── popup.js                # Popup controller: settings, model picker, generation trigger
β”‚   β”œβ”€β”€ preview/
β”‚   β”‚   β”œβ”€β”€ preview.html            # Cover letter preview page
β”‚   β”‚   β”œβ”€β”€ preview.css
β”‚   β”‚   └── preview.js              # Renders paginated, editable letter; handles PDF download
β”‚   └── prompt-editor/
β”‚       β”œβ”€β”€ prompt-editor.html      # Full-page prompt editor
β”‚       β”œβ”€β”€ prompt-editor.css
β”‚       └── prompt-editor.js        # Prompt editor controller: load, save, restore default
└── README.md

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone or download this repository:
    git clone https://github.com/ExxML/SCOPEOut.git
    
  2. Open Chrome and navigate to chrome://extensions/.

  3. Enable Developer mode (toggle in the top-right corner).

  4. Click Load unpacked and select the src/ folder inside the cloned repository.

First-time Setup

  1. Click the SCOPEOut icon to open the popup.
  2. Click Settings to expand the settings panel.
  3. Paste your Gemini API key into the field.
  4. Click Save (the extension will validate the key against all supported models).
  5. Once the key is confirmed valid, the Generate cover letter button will become available.

βš™οΈ Configuration

Selecting a Model

Use the Model dropdown under Settings in the popup to choose a Gemini model. Each option shows the rate limits for the free tier:

Model Requests / min Requests / day
Gemini 2.5 Flash Lite 10 20
Gemini 2.5 Flash (default) 5 20
Gemini 3 Flash Preview 5 20

Based on personal experimentation, these three models work well enough for generating cover letters, but you can clone this project and experiment with different models yourself (edit only model-select in popup.html).

Customising the Prompt

  1. Open the popup and expand Settings.
  2. Click Edit prompt to open the Prompt Editor in a new tab.
  3. Modify the template as desired. Three placeholders are available:
    • {companyName} : the organisation name scraped from the posting
    • {jobTitle} : the cleaned job title scraped from the posting
    • {jobDescription} : the full job description scraped from the posting
  4. Click Save Prompt. The tab title shows (*) while there are unsaved changes.
  5. Click Restore Default Prompt to revert to the built-in template at any time.

[!NOTE] This prompt is saved in your browser’s local storage. However, clearing your browser data or uninstalling SCOPEOut will delete your prompt, so we recommend keeping a backup in a separate document.

πŸ€– How It Works

User clicks "Generate cover letter"
        β”‚
        β–Ό
popup.js validates active tab URL
        β”‚
        β–Ό
Sends "startGeneration" message β†’ service-worker.js
        β”‚
        β–Ό
chrome.scripting.executeScript injects content/scraper.js
        β”‚   Extracts: companyName, jobTitle, jobDescription
        β–Ό
gemini.js builds prompt (replaces placeholders in stored/default template)
        β”‚
        β–Ό
POST to Gemini API (generateContent endpoint)
        β”‚
        β–Ό
Cover letter body returned β†’ stored in chrome.storage.session
        β”‚
        β–Ό
preview/preview.html opened in new tab
        β”‚   Renders paginated, editable letter
        β–Ό
User edits in-browser β†’ clicks "Download PDF" β†’ window.print()

Generation progress is written to chrome.storage.session at each stage (generating β†’ complete / error), so the popup displays live status updates even if it is closed and reopened during generation.

πŸ“ License

This project is licensed under the GNU General Public License v3.0.