|
| 1 | +Here’s an updated README reflecting the slimmed-down extension (the online tool is still live, even though it doesn’t surface in the extension UI): |
| 2 | + |
| 3 | +```markdown |
1 | 4 | # Markless-GPT |
2 | 5 |
|
3 | | -A Chromium extension and online tool that filters out hidden watermark markers from ChatGPT (and other LLM) outputs, ensuring you copy clean, human-readable text. |
| 6 | +A lightweight Chromium extension that cleans out hidden watermark markers (zero-width and similar) from any text you copy—whether via Ctrl +C/⌘ +C, programmatic “Copy” buttons, or cut events—so you always get plain, human-readable content. |
4 | 7 |
|
5 | | -**Try the online tool:** [https://bytemastermind.github.io/Markless-GPT/](https://bytemastermind.github.io/Markless-GPT/) |
| 8 | +> **Online tool available:** |
| 9 | +> https://bytemastermind.github.io/Markless-GPT/ |
6 | 10 |
|
7 | 11 | --- |
8 | 12 |
|
9 | 13 | ## 🚀 Features |
10 | 14 |
|
11 | 15 | - **Automatic Filtering** |
12 | | - Intercepts both manual copy (Ctrl+C/⌘+C) and programmatic clipboard writes (e.g. “Copy” buttons), funneling every snippet through a customizable text‑processing pipeline. |
13 | | - |
| 16 | + Intercepts every copy- or cut-event on the page and runs it through a simple `filterText()` pipeline. |
14 | 17 | - **Watermark Removal** |
15 | | - Detect and remove special characters or invisible markers that some models inject to tag AI‑generated text—leaving you with clean, human‑readable content. |
16 | | - |
17 | | -- **Zero Permissions Overhead** |
18 | | - No extra `clipboardWrite` permission required—Markless‑GPT hooks into the page’s native copy/cut events and the modern `navigator.clipboard.writeText` API. |
19 | | - |
20 | | -- **Domain‑Aware Toggle** |
21 | | - Easily enable or disable filtering on a per‑site basis via the extension’s popup UI. |
22 | | - |
23 | | -- **Extensible Filter Function** |
24 | | - Replace the built‑in `filterText()` routine with your own logic (regex, profanity filters, token redaction, etc.). |
| 18 | + Strips zero-width spaces, non-breaking spaces, and other invisible markers often injected by AI models. |
| 19 | +- **Button-Click Fallback** |
| 20 | + Detects “Copy” buttons, lets the page write first, then cleans up what lands on the clipboard. |
| 21 | +- **Inline Toast & Logging** |
| 22 | + Brief “Text safely copied!” toast for feedback plus console logs of raw vs. cleaned text. |
| 23 | +- **No Extra Permissions** |
| 24 | + Works without requesting any special `"clipboardWrite"` or host permissions—hooks into existing copy/cut handlers and the standard Clipboard API. |
25 | 25 |
|
26 | 26 | --- |
27 | 27 |
|
28 | 28 | ## 📦 Installation |
29 | 29 |
|
30 | | -1. Clone this repository |
| 30 | +1. **Clone** the repo |
31 | 31 | ```bash |
32 | 32 | git clone https://github.com/ByteMastermind/Markless-GPT.git |
33 | 33 | ``` |
| 34 | +2. **Load** into your browser |
| 35 | + - Navigate to `chrome://extensions/` (or `edge://extensions/`, etc.) |
| 36 | + - Enable **Developer mode** |
| 37 | + - Click **Load unpacked** and select the `markless-gpt/` folder |
34 | 38 |
|
35 | | -2. Load into your Chromium‑based browser |
36 | | - - Go to `chrome://extensions/` (or `edge://extensions/`, etc.) |
37 | | - - Enable “Developer mode” |
38 | | - - Click **Load unpacked** and select `markless-gpt` directory |
39 | | - |
40 | | -3. Enjoy watermark‑free copying! |
| 39 | +That’s it - no restart needed. |
41 | 40 |
|
42 | 41 | --- |
43 | 42 |
|
44 | 43 | ## ⚙️ Usage |
45 | 44 |
|
46 | | -1. Click the **Markless-GPT** toolbar icon to toggle filtering on or off for the current domain. |
47 | | -2. Copy text as you normally would—either by selecting and hitting Ctrl+C (⌘+C) or by clicking any “Copy” buttons on the page. |
48 | | -3. Paste: you’ll get the same text, minus any hidden watermark markers. (Verify [here](https://bytemastermind.github.io/Markless-GPT/)) |
| 45 | +1. Copy or cut anything on any page in your Chromium-based browser: |
| 46 | + - **Keyboard** → Ctrl +C / Ctrl + X (⌘ +C / ⌘ + X on macOS) |
| 47 | + - **Buttons** → a traditional copy buttons on the page |
| 48 | +2. Paste anywhere - you’ll get the exact same text minus hidden watermark characters. |
49 | 49 |
|
50 | 50 | --- |
51 | 51 |
|
52 | 52 | ## 🛠️ Customizing the Filter |
53 | 53 |
|
54 | | -Open `content-script.js` and edit: |
| 54 | +Open `content-script.js` and tweak the `filterText` function: |
| 55 | + |
55 | 56 | ```js |
56 | | -function filterText(input) { |
57 | | - // Default: strip out all non‑printable (zero‑width) characters |
58 | | - return input.replace(/[\u200B-\u200D\uFEFF]/g, ''); |
59 | | -} |
| 57 | +// Default removes common zero-width / invisible chars: |
| 58 | +const filterText = input => |
| 59 | + input |
| 60 | + .replace(/\u00A0/g, ' ') |
| 61 | + .replace(/\u202F/g, ' ') |
| 62 | + .replace(/[\u200B-\u200D\uFEFF]/g, ''); |
60 | 63 | ``` |
61 | | -You can swap in your own regex, call out to a background script for heavy processing, or integrate third‑party libraries. |
| 64 | + |
| 65 | +Feel free to extend it with your own regex rules, profanity filters, token redaction, or remote processing via a background script. |
62 | 66 |
|
63 | 67 | --- |
64 | 68 |
|
65 | 69 | ## 💡 Why Markless-GPT? |
66 | 70 |
|
67 | | -LLMs sometimes embed invisible tokens or special characters to “mark” AI‑generated text. Markless‑GPT ensures that anything you copy and paste is free of these behind‑the‑scenes markers, making your workflows cleaner and more reliable. |
| 71 | +LLMs and other pipelines sometimes slip in invisible markers to tag AI-generated text. Markless-GPT makes sure anything you copy is free of these hidden artifacts—no permissions, no popups, just clean text. |
68 | 72 |
|
69 | 73 | --- |
70 | 74 |
|
71 | 75 | ## 📄 License |
72 | 76 |
|
73 | | -MIT © [bytemastermind](https://github.com/ByteMastermind) |
74 | | - |
| 77 | +MIT © [ByteMastermind](https://github.com/ByteMastermind) |
0 commit comments