
What If the Page Could Detect Data Formats Without Copying? — Adding Page Scan + JWT Detection to a Chrome Extension
The Limits of Clipboard Detection In my previous article , I built a Chrome extension that auto-detects clipboard data formats. Copy → click icon → detect → open in tool. Handy. After using it for a while, something bugged me. I was reading a Qiita article. A JSON API response was displayed in a <pre> block. Deeply nested, hard to read. I wanted to format it. I selected the JSON with my mouse. Ctrl+C. Clicked the extension icon. Popup opened. "Format JSON" appeared. Clicked. Tool opened and formatted it. Wait — the data is already on screen. Why do I need to copy it? There was another problem. Copying JSON from Japanese tech blogs introduced smart quotes ( "" → "" ) and trailing commas. The CMS silently converts quotes to "pretty" curly quotes. On screen it looks like "name" , but the clipboard contains \u201Cname\u201D . JSON.parse() fails instantly. "If I scan the code blocks directly from the page, no copying needed, and no CMS interference." Built it. Chrome extension PureMark Dete
Continue reading on Dev.to Webdev
Opens in a new tab



