Skip to content

A browser extension to view LeetCode problems in classic(old) web UI

Notifications You must be signed in to change notification settings

chandrakishorSingh/leetcode-classic-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Classic View Extension

This browser extension automatically redirects LeetCode problem pages to the classic UI by adding /classic/ to the URL path. It intelligently avoids redirecting pages that would result in 404 errors.

Features

  • Automatically redirects problem pages to the classic UI
  • Checks if the classic page exists before redirecting to prevent 404 errors
  • Allows disabling/enabling the extension via popup
  • Works only on LeetCode domains for security
  • Compatible with both Chrome and Firefox

Installation

Chrome

  1. Open Chrome and navigate to chrome://extensions
  2. Enable "Developer mode" (toggle in top-right corner)
  3. Click "Load unpacked" and select the leetcode-classic-view folder
  4. The extension will appear in your extensions list

Firefox

  1. Open Firefox and navigate to about:debugging
  2. Click "This Firefox" on the left sidebar
  3. Click "Load Temporary Add-on"
  4. Select the manifest.json file from the leetcode-classic-view folder

How It Works

The extension monitors navigation to LeetCode pages and automatically adds /classic/ to the URL path for eligible pages. It performs a HEAD request to check if the classic version exists before redirecting, preventing 404 errors.

Only problem pages (e.g., /problems/two-sum/) are redirected. Main pages like the homepage, contest pages, discuss forums, etc. are not affected.

Supported Pages

  • Problem pages (e.g., https://leetcode.com/problems/two-sum/)
  • Solution articles (where available)

Unsupported Pages (Will Not Redirect)

  • Homepage (/)
  • Problems list (/problems/)
  • Problemset (/problemset/)
  • Contests (/contest/)
  • Discuss forum (/discuss/)
  • Explore section (/explore/)
  • Interview prep (/interview/)
  • Premium pages (/premium/)
  • And other non-problem pages

Popup Controls

Click the extension icon to open a popup that allows you to enable/disable the extension temporarily.

License

MIT

About

A browser extension to view LeetCode problems in classic(old) web UI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published