A lightweight browser extension for Codeforces that automatically fills the problem ID on the submit page. Built with Manifest V3, vanilla JavaScript, and no frameworks.
- Auto-detect problem ID from contest, problemset, gym, and group contest URLs
- Auto-fill
submittedProblemCode(problemset) andsubmittedProblemIndex(contest/gym) without overwriting your input - MutationObserver for dynamically loaded submit forms
- Keyboard shortcut
Alt + S— open submit page and fill the problem - Language memory — remembers your last
programTypeIdselection - Minimal indicator — small “Problem detected: 2100C” badge when a problem is recognized
- Chrome & Firefox — single codebase, MV3-compatible
| Page type | Example URL | Problem code |
|---|---|---|
| Contest | /contest/2100/problem/C |
2100C |
| Problemset | /problemset/problem/2100/C |
2100C |
| Gym | /gym/123456/problem/A |
123456A |
| Group contest | /group/.../contest/2100/problem/B |
2100B |
Submit pages are detected automatically (/contest/*/submit, /problemset/submit, /gym/*/submit, etc.).
- Clone or download this repository.
- Generate icons if needed:
python3 scripts/generate-icons.py - Open
chrome://extensions - Enable Developer mode
- Click Load unpacked and select the project folder (
cf-autosubmit)
- Open
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on…
- Select
manifest.jsonin this folder
For a signed Firefox release, package with web-ext (see Build & packaging).
After install, confirm the shortcut at:
- Chrome:
chrome://extensions/shortcuts - Firefox:
about:addons→ CF Auto Submit → gear → Manage Extension Shortcuts
Default: Alt + S
- Open any supported Codeforces problem page.
- A small indicator appears:
Problem detected: 2100C. - Go to the submit page (menu or Alt + S).
- The problem field is filled only if it was empty; your edits are never overwritten.
- Your last programming language is preselected on the next submit.
Click the extension icon for a quick status popup.
cf-autosubmit/
├── manifest.json # MV3 manifest (Chrome + Firefox)
├── content.js # Page detection, form fill, indicator, observer
├── background.js # Alt+S command, navigation, fill retries
├── popup/
│ ├── popup.html
│ ├── popup.css
│ └── popup.js
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
├── scripts/
│ ├── build.sh
│ └── generate-icons.py
├── store/ # Chrome Web Store listing metadata
└── README.md
python3 scripts/generate-icons.py./scripts/build.shOutput: dist/cf-autosubmit-v1.0.0.zip
npm install -g web-ext
web-ext lint
web-ext build --source-dir . --artifacts-dir distUpload the artifact from web-ext build to addons.mozilla.org.
- Zip the extension (use
scripts/build.shor zip manually withoutdist/,.git,scripts/if desired). - Upload at Chrome Developer Dashboard.
- Use copy from
store/chrome-listing.md.
| Permission | Why |
|---|---|
storage |
Sync last problem & language for popup and Alt+S |
host_permissions → codeforces.com |
Navigate to submit page on shortcut |
No access to other sites, no remote code, no analytics.
Current icons: blue badge with CF (Codeforces-style blue #1f6feb).
Ideas for a future refresh:
- Stylized “>>” submit arrow merged with problem letter C
- Monochrome glyph for better contrast in dark browser themes
- Optional dark-mode variant via
theme_iconsin manifest
Regenerate anytime with scripts/generate-icons.py or replace PNGs in icons/.
- Options page to disable indicator or customize shortcut
- Support
*.contest.codeforces.comgroup mirrors - Retry fill when contest problem dropdown loads late (right after contest start)
- Optional “fill even if field has value” toggle for power users
- Export/import settings across browsers via
chrome.storage.sync - Integration with local IDE submit tools via
externally_connectable(opt-in)
- Local only: Problem IDs and language preference are stored in your browser (
localStorageoncodeforces.comandchrome.storage.local). Nothing is sent to third-party servers. - No credentials: The extension does not read passwords, cookies for exfiltration, or submission source code.
- Minimal scope: Runs only on
codeforces.comcontent scripts plus storage. - No overwrite: Deliberately avoids changing fields you already filled, reducing accidental wrong submits.
- Open source: Audit
content.jsandbackground.js— total script size is small.
Disclaimer: Always verify the problem ID before submitting. This tool assists filling forms; you are responsible for correct submissions.
Reload the extension after edits:
- Chrome:
chrome://extensions→ Reload - Firefox:
about:debugging→ Reload
Test paths:
- Visit
https://codeforces.com/problemset/problem/2100/C - Press Alt + S or open submit manually
- Confirm
submittedProblemCodeshows2100Cwhen empty