Skip to content

marcusgreenwood/dear-llm

Repository files navigation

DearLLM - LinkedIn AI Post Detector

A Chrome extension that detects likely AI-generated LinkedIn posts and displays a reverse-engineered prompt that could have created them. The extension adds a "Dear LLM, ..." banner above posts that appear to be AI-generated.

Features

  • 🤖 AI Detection: Uses heuristics to identify likely AI-generated posts
  • Reverse Prompt Engineering: Generates plausible prompts that could have created the detected posts
  • 🎨 Typewriter Effect: Displays prompts with a smooth typewriter animation
  • 🎯 Visibility-Based: Only processes posts that are visible on screen
  • 🔄 Auto-Expand: Automatically expands posts with "...more" buttons
  • 🎲 Randomized Prompts: Each prompt is unique with varying styles and lengths

Installation

Step 1: Download the Extension

  1. Clone or Download this repository to your computer
  2. Extract the files if you downloaded a ZIP file
  3. Make sure you have all the required files:
    • manifest.json
    • background.js
    • contentScript.js
    • options.html
    • options.js
    • icon16.png, icon32.png, icon48.png, icon128.png

Step 2: Load in Chrome

  1. Open Google Chrome
  2. Navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in the top-right corner)
  4. Click "Load unpacked"
  5. Select the folder containing your extension files
  6. The extension should now appear in your extensions list

Step 3: Pin the Extension (Optional)

  1. Click the puzzle piece icon in Chrome's toolbar
  2. Find "DearLLM" in the list
  3. Click the pin icon to keep it visible in your toolbar

Getting an OpenAI API Key

Step 1: Create an OpenAI Account

  1. Go to OpenAI's website
  2. Click "Sign up" or "Log in"
  3. Complete the registration process

Step 2: Access the API

  1. Once logged in, go to OpenAI API Keys
  2. Click "Create new secret key"
  3. Give your key a name (e.g., "DearLLM Extension")
  4. Click "Create secret key"
  5. Copy the key immediately - it starts with sk- and won't be shown again

Step 3: Add Credits to Your Account

  1. Go to OpenAI Billing
  2. Click "Add payment method"
  3. Add a credit card or other payment method
  4. Add some credits to your account (even $5-10 is enough to start)

Configuration

Step 1: Open Extension Options

  1. Click the DearLLM extension icon in your toolbar
  2. Click "Options" or go to the extension's options page

Step 2: Add Your API Key

  1. Paste your OpenAI API key (starts with sk-) into the input field
  2. Click "Save"
  3. You should see a green "API key saved!" message

Usage

How It Works

  1. Browse LinkedIn: Go to LinkedIn and scroll through your feed
  2. AI Detection: The extension automatically scans posts for AI-like patterns:
    • Posts with more than 120 words
    • Posts containing corporate buzzwords like "leverage", "synergy", "thrilled to announce"
  3. Banner Display: When an AI-like post is detected, a yellow banner appears above it
  4. Typewriter Effect: The prompt is typed out character by character
  5. Auto-Expand: Posts with "...more" buttons are automatically expanded

What You'll See

  • Yellow Banner: Appears above AI-detected posts
  • "Dear LLM, Write a post...": The reverse-engineered prompt
  • Smooth Animation: Text appears with a typewriter effect
  • Varied Prompts: Each prompt is unique and randomized

Troubleshooting

Extension Not Working?

  1. Check if it's enabled: Go to chrome://extensions/ and make sure DearLLM is enabled
  2. Reload the extension: Click the refresh icon on the extension card
  3. Check console logs: Open DevTools (F12) and look for [DearLLM Content] logs
  4. Verify API key: Make sure your API key is saved in the options

No Banners Appearing?

  1. Check API key: Verify your OpenAI API key is valid and has credits
  2. Look for AI posts: The extension only flags posts that meet AI detection criteria
  3. Check console: Look for debug logs in the browser console
  4. Refresh LinkedIn: Try refreshing the page

API Errors?

  1. Check credits: Make sure your OpenAI account has sufficient credits
  2. Verify key: Ensure your API key is correct and starts with sk-
  3. Check usage: Visit OpenAI Usage to see your API usage

Debug Mode

The extension includes comprehensive debug logging. To view logs:

Content Script Logs

  • Go to LinkedIn
  • Open DevTools (F12)
  • Go to Console tab
  • Look for logs starting with [DearLLM Content]

Background Script Logs

  • Go to chrome://extensions/
  • Find DearLLM and click "Details"
  • Click "Service Worker"
  • Look for logs starting with [DearLLM Background]

Options Page Logs

  • Open extension options
  • Open DevTools (F12)
  • Look for logs starting with [DearLLM Options]

Privacy & Security

  • Local Processing: All AI detection happens locally in your browser
  • API Calls: Only the text content is sent to OpenAI for prompt generation
  • No Data Storage: The extension doesn't store or transmit your personal data
  • Open Source: You can review the code to see exactly what it does

Cost

  • Extension: Free
  • OpenAI API: Pay-per-use, typically $0.01-0.05 per prompt
  • Estimated Cost: $1-5 per month for regular LinkedIn browsing

Support

If you encounter issues:

  1. Check the debug logs (see Debug Mode section)
  2. Verify your API key and credits
  3. Try reloading the extension
  4. Check that you're on the main LinkedIn feed page

Technical Details

  • Manifest Version: 3
  • Permissions: Storage, OpenAI API access
  • Target Sites: LinkedIn feed pages
  • Browser Support: Chrome and Chromium-based browsers

Note: This extension is for educational and entertainment purposes. The AI detection is based on heuristics and may not be 100% accurate. Use responsibly and respect others' privacy.

About

LinkedIn is insufferable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published