Skip to content

porhkz/leetsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetSync Auto Push

Chrome extension scaffold that watches LeetCode's submission network flow and commits accepted solutions into a selected GitHub repository.

What it does

  • Hooks LeetCode's submit GraphQL request to capture the exact code sent to LeetCode.
  • Hooks LeetCode's submission check request and only uploads after the result is Accepted.
  • Uses a Chrome Extension Manifest V3 background service worker to commit the solution to GitHub.
  • Names the committed file as <problem number>. <problem title>.<extension>.

Setup

  1. Create a GitHub personal access token with at least repo access (classic token) or equivalent contents permissions (fine-grained token).
  2. Open chrome://extensions.
  3. Enable Developer Mode.
  4. Click Load unpacked and select this folder.
  5. Open the extension popup.
  6. Paste the token, connect GitHub, and select the repository that should receive accepted solutions.

Notes

  • This implementation is event-driven. It reacts to the actual LeetCode submit and check network requests instead of polling the page.
  • The current scaffold commits files to the repository root.
  • GitHub authentication is implemented with a personal access token stored in chrome.storage.local. If you want a full OAuth flow later, that requires registering a GitHub OAuth app and adding the callback flow to the extension.

About

Automatically sync Leetcode submissions to GitHub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors