One-click copy of
raw.githubusercontent.comlinks on GitHub file pages.
When browsing a file on GitHub, RawLink injects a copy button next to the Raw button. One click copies the raw.githubusercontent.com direct link to your clipboard — no page navigation needed.
- One-click copy — copies the raw URL instantly on button click
- Visual feedback — button icon turns green for 2 seconds to confirm success
- SPA-aware — works across GitHub's client-side navigation without page reloads
- Dual selector strategy — primary selector + fallback to handle GitHub UI changes gracefully
- Zero permissions — no
clipboardWriteor other sensitive permissions required
-
Clone the repository and install dependencies:
git clone https://github.com/rsecss/rawlink.git cd rawlink pnpm install -
Build the extension:
pnpm build
-
Open Chrome and go to
chrome://extensions -
Enable Developer mode (toggle in the top-right corner)
-
Click Load unpacked and select the
.output/chrome-mv3/directory
Requirements: Node.js ≥ 18, pnpm
pnpm dev # Start HMR dev mode (auto-opens Chrome)
pnpm build # Production build → .output/chrome-mv3/
pnpm zip # Package ZIP for Chrome Web Store submission
pnpm typecheck # TypeScript strict-mode type check
pnpm test # Run unit tests once
pnpm test:watch # Run tests in watch mode
pnpm test:coverage # Generate coverage reportsrc/
├── entrypoints/
│ └── github-raw.content.ts # Content script — lifecycle & event wiring
└── modules/
├── url-parser.ts # Pure function: GitHub URL → raw URL
├── clipboard.ts # Clipboard write + visual feedback
└── dom-injector.ts # Button injection & cleanup
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create a feature branch:
git checkout -b feat/your-feature - Commit following Conventional Commits
- Open a pull request against
main