JinaClip README

The project's README from github.com/AhmadHassan-BTed/JinaClip. As one markdown file: README.md.

Jina Reader — Local Edition (v7)

Professional-Grade • Local-First • Privacy-Centric

Transform any webpage into high-fidelity, LLM-friendly Markdown entirely within the browser.

License: MIT Engine: Local-First Privacy: Zero-Cloud Author: Ahmad Hassan


Designed for AI Workflows. Engineered for Privacy.

The Philosophy

In an era of cloud-dependency and rate-limited APIs, Jina Reader (Local) represents a pivot back to local-first computing. This project eliminates the middleman, removing the need for r.jina.ai cloud calls by implementing the entire extraction and transformation pipeline directly in the browser's runtime. Content remains local, speed is absolute, and usage is infinite.


Architectural Excellence

The system is built on a modular, Service-Oriented Architecture (SOA) designed to handle the complexities of the modern web (Shadow DOM, dynamic iframes, and SPA layouts).

1. High-Level System Flow

The following diagram illustrates the lifecycle of a single "Copy" request, from the user's action to the final clipboard entry.

graph TD
    User([User Action: Click/Hotkeys/Menu]) --> Orchestrator[Background Orchestrator]
    Orchestrator --> Config[Config Service]
    Config --> Service[LocalReaderService v7]
    
    subgraph "Target Tab Context"
        Service -- Script Injection --> Engine[v7 Intelligence Engine]
        Engine -- DOM Scoring --> Root[Content Root Discovery]
        Root -- Cleaning --> Clone[Sanitized Clone]
        Clone -- Conversion --> MD[Markdown/JSON/HTML]
    end
    
    MD -- Message Passing --> Service
    Service -- Clipboard API --> OS[System Clipboard]
    Service -- Notification API --> User

2. The v7 Intelligence Engine

At the heart of the project is the Heuristic Scoring Engine. Instead of "guessing" where the content is, it calculates a text-to-link density ratio and penalizes interactive "noise" (dashboards, buttons, navs).

sequenceDiagram
    participant P as Web Page
    participant E as Intelligence Engine
    participant S as Scoring Module
    participant C as Converter
    
    E->>P: Traverse DOM Tree
    P-->>E: Candidate Elements (div, main, article)
    E->>S: Compute (Text Density - Link Density)
    S-->>E: Final Scores
    E->>P: Flatten Shadow DOM & Iframes
    E->>C: Execute Pro-Grade Markdown Conversion
    C-->>E: LLM-Friendly Payload

Feature Matrix

Feature Local Engine (v7) Cloud Reader
Privacy 100% Local Cloud Processed
Rate Limits Infinite Strictly Limited
Cost $0 Token Based
Shadow DOM ✅ Supported ❌ Limited
Table Formatting ✅ Pro Grade ✅ Basic
Full Pageshots ✅ Stitched Canvas ❌ N/A

Repository Structure

p:/extensions/JinaClip - Copy Page for LLM/
├── scripts/
│   └── build.js          # Professional packaging pipeline
├── src/
│   ├── background/
│   │   └── index.js      # Lifecycle & Event Orchestration
│   ├── services/
│   │   └── localReader.js # Core Extraction & Transformation Engine (v7)
│   ├── utils/
│   │   └── logger.js      # System-wide observability
│   └── config/
│       ├── constants.js   # Immutable definitions
│       └── defaultSettings.js
├── icons/                # High-fidelity visual assets
└── manifest.json         # Extension Manifest (MV3)

Technical Pipeline: Full Page Capture

The "Pageshot" feature utilizes a multi-stage stitching pipeline to capture full-length articles without loss of detail.

  1. Dimension Analysis: Calculates scrollHeight and viewHeight.
  2. Synchronized Scrolling: Executes discrete jumps with paint-settle delays.
  3. Canvas Orchestration: Assembles visible segments in a OffscreenCanvas.
  4. Data Delivery: Converts the final buffer to a high-quality Markdown-wrapped Base64 string.

Installation & Development

Onboarding for Contributors

The codebase is written in vanilla ES6+ to ensure zero-coupling and maximum longevity.

  1. Clone & Setup:
    git clone <repo-url>
    npm install
    
  2. Build for Production:
    npm run build
    
  3. Browser Loading:
    • Open chrome://extensions/
    • Load the dist/ folder as an "Unpacked Extension."

Professional Usage


Credits & License

This project was architected and developed by Ahmad Hassan (B-Ted) as a part of the movement toward high-performance, local-first AI tools.

Distributed under the MIT License. Contributions that align with the core philosophy of "Clean Code & User Privacy" are welcomed.


"The best way to read the web is locally."

JinaClip (AhmadHassan-BTed/JinaClip)

es6
Searching Database…

What is this?Jina Reader (Local Edition) is a browser extension that converts any webpage into high-fidelity, LLM-friendly Markdown entirely inside the browser, with no cloud API involved.
Is this a Chrome extension, or does it run in other browsers too?It's a Manifest V3 browser extension; the install instructions load it as an unpacked extension via chrome://extensions/, so it targets Chromium-based browsers.
Do I need any frameworks or build tools to use it?The extension itself has no runtime dependencies and is written in vanilla ES6+; you just need to run the build step before loading it in Chrome.
Is it available on the Chrome Web Store?The README only documents manual installation by loading the built dist/ folder as an unpacked extension; there's no mention of a Web Store listing.
Does any of my page content get sent to a server?No, the entire extraction and Markdown conversion pipeline runs locally in the browser, removing the need for calls to the r.jina.ai cloud service.
How does it decide which part of a messy webpage is the real content?It uses a Heuristic Scoring Engine that calculates a text-to-link density ratio and penalizes interactive noise like dashboards, buttons, and navs to isolate the main content.
Can it capture a full-page screenshot, not just text?Yes, its 'Pageshot' feature scrolls the page, stitches the visible segments on an OffscreenCanvas, and outputs the result as a Markdown-wrapped Base64 image.
What output formats besides Markdown does it support?Right-clicking the extension icon lets you pick JSON, HTML, or plain Text in addition to the default Markdown copy.
Is there a keyboard shortcut for quick capture?Yes, Alt+Shift+J triggers an immediate capture without needing to click the icon.
Size
0.1 MB
Stars
1.7K
Updated
CommitJun 30
Age
5mo
Commits · 90 Days