A Chrome extension that enhances the Coursera learning experience by providing additional functionality, starting with a transcript copy feature.
- Copy Lecture Transcript: Adds a "Copy" button next to the "Discuss" tab in course lectures to easily copy the entire transcript to clipboard
- Modern UI with Tailwind CSS styling
- Responsive design that matches Coursera's interface
- TypeScript for enhanced type safety and developer experience
- React components for modular UI development
- Webpack configuration for development and production builds
- Husky for Git hooks management
- ESLint + Prettier for code formatting
- Markdownlint for markdown file consistency
- Lint-staged for pre-commit code quality checks
- Bun as the JavaScript runtime and package manager
- Jest for testing framework
coursera-extension/
├── .github/ # GitHub configuration
├── .husky/ # Git hooks configuration
├── src/
│ ├── content/ # Content scripts
│ ├── types/ # TypeScript type definitions
│ └── manifest.json # Extension manifest
├── public/ # Static assets
├── dist/ # Built files
├── .eslintrc.cjs # ESLint configuration
├── .prettierrc # Prettier configuration
├── .markdownlint-cli2.jsonc # Markdownlint configuration
├── tsconfig.json # TypeScript configuration
├── webpack.common.js # Common webpack configuration
├── webpack.dev.js # Development webpack configuration
├── webpack.prod.js # Production webpack configuration
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.cjs # PostCSS configuration
└── package.json # Project dependencies
- TypeScript for type safety
- React for UI components
- Tailwind CSS for styling
- Webpack for bundling
- Bun for package management and running scripts
- ESLint + Prettier for code formatting
- Jest for testing
- Husky + lint-staged for Git hooks
- PostCSS for CSS processing
- Markdownlint for markdown linting
- Leave a for this repo
- Node.js (v18 or higher)
- Git
- Bun (for faster package management)
- Google Chrome browser
The project uses markdownlint for consistent markdown formatting. The rules are configured in .markdownlint-cli2.jsonc
. To check markdown files locally:
bun markdownlint-cli2 "**/*.md"
To automatically fix markdown issues:
bun markdownlint-cli2-fix "**/*.md"
-
Open your terminal and clone the repository:
git clone https://github.com/lumpinif/coursera-transcript-copy-button.git cd coursera-transcript-copy-button
-
Install Bun (if not already installed):
# For macOS and Linux: curl -fsSL https://bun.sh/install | bash # For Windows (using PowerShell): powershell -c "irm bun.sh/install.ps1|iex"
-
Install project dependencies:
bun install
-
Build the extension:
bun run build
- Open Google Chrome
- Type
chrome://extensions/
in the address bar and press Enter - Enable "Developer mode" by toggling the switch in the top-right corner
- Click "Load unpacked" button in the top-left corner
- Navigate to your project's directory and select the
dist
folder - The extension should now appear in your extensions list
- Pin the extension by clicking the puzzle piece icon in Chrome's toolbar and clicking the pin icon
- Go to any Coursera lecture page
- You should see a new "Copy" button next to the "Discuss" tab
- Click the button to copy the lecture transcript
If the extension doesn't appear:
- Make sure you've built the project (
bun run build
) - Check if Developer mode is enabled
- Try reloading the extension
- Clear Chrome's cache and restart the browser
bun install # Install dependencies
bun run dev # Start development mode with watch
bun run build # Build for production
bun run test # Run tests
bun run lint # Run linting
bun run format # Format code with Prettier
This project uses GitHub Actions for CI with Bun. The CI pipeline:
- Runs on every push to main and pull requests
- Installs dependencies with Bun
- Runs build, tests, and linting
- Ensures code quality and functionality
-
Performance:
- Efficient DOM manipulation
- Debounced event handlers
- Minimal re-renders
- Optimized Tailwind CSS output
-
Code Quality:
- TypeScript for type safety
- ESLint for code quality
- Prettier for consistent formatting
- Modular React components
-
Error Handling:
- Graceful degradation
- User-friendly error messages
- Logging for debugging
-
Maintainability:
- Modular code structure
- Clear documentation
- Consistent naming conventions
- Component-based architecture
- Chrome: Latest version
- Other Chromium-based browsers (Edge, Brave, etc.): Should work but not officially supported
Contributions are welcome! Please feel free to submit a Pull Request.