A quick DevTools snippet to extract clean, readable text from documentation pages (Chrome Docs, React, Python, etc.) directly into your clipboard.
Removes navigation bars, sidebars, and HTML clutter—giving LLMs (ChatGPT, Claude, Gemini) pure text and code examples without wasting context tokens.
- Open DevTools in your browser (
F12orCtrl + Shift + I/Cmd + Option + I). - Go to the Console tab.
- Paste the following code and press Enter :
(() => {
// Finds the main documentation content area (falls back to body)
const mainContent = document.querySelector('main, article, [role="main"]') || document.body;
// Copies clean readable text without HTML layout clutter
copy(mainContent.innerText);
console.log('Documentation text copied to clipboard!');
})();
- Paste the extracted documentation directly into your AI prompt!