A beginner-friendly Chrome extension that adds a copy button to LaTeX equations on webpages — made with simplicity, readability, and learning in mind.
Screen.Recording.2025-07-20.141926.mp4
This is not just another extension. This is my first project built using Object-Oriented Programming (OOP) in JavaScript — a small but meaningful milestone in my coding journey.
Inspired by enoobis and his pinned extension, most of the structure here is refactored and adapted from his clean, modular approach.
✅ Built using classes for better structure
✅ No bloated frameworks — just raw JavaScript
✅ Easy-to-read for beginners learning how to build extensions
✅ Focused on one simple feature — copying LaTeX expressions
This repo is especially useful if:
You’re trying to learn how to make Chrome extensions
You want a minimal, readable starting point
You’re curious how to use classes in a real-world mini project
You're tired of tutorials that are either too basic or too advanced
copy-latex/
├── manifest.json # Extension metadata
├── content.js # Core logic injected into pages
└── README.md # You're reading it!
📸 Demo
See the little copy icon? Click it and your LaTeX is copied to clipboard. That’s it. Simple and effective.
The script runs on pages with LaTeX (like katex-display spans).
It uses a class to modularize the logic:
Detect LaTeX blocks
Append a copy button
Handle clipboard logic
Written in plain JavaScript with minimal DOM manipulation
Big thanks to enoobis — his pinned repo taught me the value of clean code and project structure.
This is more than a copy button. It’s a reflection of learning how to code the right way — with structure, clarity, and inspiration.
If you're searching for a Chrome extension tutorial that's actually understandable, start here.