MCPcopy Index your code
hub / github.com/XYShaoKang/refined-leetcode

github.com/XYShaoKang/refined-leetcode @v0.14.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.14.4 ↗ · + Follow
382 symbols 936 edges 141 files 49 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

semantic-release GitHub Action

Refined LeetCode

添加一些有用和有意思的功能,增强 LeetCode-cn 刷题体验

chrome-store-badge edge-store-badge

Refined LeetCode 是一个 Chrome 浏览器。理论上来说大多数基于 Chromium 开发浏览器都能支持,比如像 Microsoft Edge、Opera、Yanda 等浏览器。

我建了个 QQ 群:250316825,有兴趣可以加这个群,在群里进行反馈和交流。

功能

各功能的使用说明和视频演示,可以点击链接查看

安装

有两种安装方式,通过在线商店安装,或者通过离线安装。

在线安装

可以通过从 Chrome Web Store 安装。另外我也在 Microsoft Edge Addons 发布了这款扩展,如果使用 Microsoft Edge 浏览器,并且无法访问谷歌的话,可以从这里安装。但微软的审核会长一些,有可能会比谷歌商店慢上一些版本,所以即使使用 Microsoft Edge 浏览器,也比较推荐从Chrome Web Store安装,可以获得更及时的更新

推荐直接通过在线安装的方式来安装,比较方便,并且当扩展有更新的时候,会自动更新到最新版本。

但因为提交到商店需要进行审核,有时需要进行一些时间的等待,这时如果想要尝鲜,或者是因为某些原因无法连接到商店,可以尝试进行按照下面的方式进行「离线安装」,不过这样如果想要获取更新就需要每次手动来下载一下了。

离线安装

离线安装支持以下两种方式

  • 解压文件夹
  • crx 文件

启用开发者模式

  1. 打开 Chrome 浏览器
  2. 转到 chrome://extensions/ 页面,直接在地址栏输入 chrome://extensions/ 即可
  3. 切换页面右上角的开发者模式为启用的状态,并「刷新页面」

测试的时候,发现有时候不用「刷新页面」,后续也可以正常操作,但为了防止意外,最好是刷新一下页面

解压文件夹

从 https://github.com/XYShaoKang/refined-leetcode/releases 下载最新版本的 refined-leetcode-v[xxx].zip,解压 refined-leetcode-v[xxx].zip (其中 xxx 表示版本号)

  • 方式 1: 直接将前面解压的 refined-leetcode 文件夹拖入 chrome://extensions/ 页面即可
  • 方式 2:
  • 点击页面左上角的 加载以解压的扩展程序 按钮
  • 选择上面解压的 refined-leetcode 文件夹,再点击确定即可

操作视频

https://user-images.githubusercontent.com/38753204/226101191-9be75d42-c218-4005-b718-6aa43790f134.mov

crx 文件

从 https://github.com/XYShaoKang/refined-leetcode/releases 下载最新版本的 refined-leetcode-[xxx].crx 文件,或者 refined-leetcode-[xxx].crx.zip 进行解压 (其中 xxx 表示版本号)

  • 直接将 crx 文件拖入 chrome://extensions/ 页面,会弹出一个提示,点击添加扩展程序按钮即可

操作视频

https://user-images.githubusercontent.com/38753204/226101189-92b915dd-e1ef-4173-882e-70ec0fecdc53.mov

相关项目

感谢 leetcode.cn 力扣,提供了一个体验非常好的刷题平台,另外感谢以下相关项目提供的数据支持

  • https://github.com/baoliay2008/lccn_predictor 力扣竞赛评分预测项目,也是扩展目前使用的预测数据源
  • https://github.com/zerotrac/leetcode_problem_rating 力扣题目评分项目,也是扩展中题目评分的数据源
  • https://github.com/SysSn13/leetcode-rating-predictor 力扣竞赛评分预测预测,是之前使用的预测数据源
  • 评分功能中,对应评分的颜色参考 https://clist.by/problems/ 和 https://codeforces.com/ 中对应等级的颜色

Extension points exported contracts — how you extend this code

FiberRoot (Interface)
(no doc)
src/content/types/global.d.ts
HTMLElement (Interface)
(no doc)
src/content/types/global.d.ts
DefaultTheme (Interface)
(no doc)
src/content/types/styled.d.ts
WindowEventMap (Interface)
(no doc)
src/content/types/customEvent.d.ts
TooltipOwnerProps (Interface)
(no doc)
src/content/components/ToolTip.tsx

Core symbols most depended-on inside this repo

useEffectMount
called by 16
src/content/hooks/useEffectMount.ts
findElement
called by 14
src/content/utils/utils.ts
useHover
called by 14
src/content/hooks/useHover.ts
findElementByXPath
called by 12
src/content/utils/utils.ts
gkey
called by 12
src/content/utils/utils.ts
debounce
called by 10
src/utils/utils.ts
setDefaultState
called by 10
src/content/pages/ranking/rankSlice.ts
routerTo
called by 8
src/content/utils/utils.ts

Shape

Function 278
Method 53
Interface 39
Class 12

Languages

TypeScript100%

Modules by API surface

src/content/utils/leetcode-api.ts44 symbols
src/content/utils/utils.ts22 symbols
src/content/pages/ranking/rankSlice.ts17 symbols
src/content/pages/problems/Timer.tsx11 symbols
src/content/pages/global/optionsSlice.ts9 symbols
src/content/pages/problems/utils.ts8 symbols
src/content/pages/problem-list/FavoriteItem.tsx8 symbols
src/content/pages/home/BlockUserList.tsx8 symbols
src/content/pages/ranking/utils.ts7 symbols
src/content/pages/problemset/AddQuestion.tsx7 symbols
src/content/utils/conv.ts6 symbols
src/content/pages/problemset/utils.ts6 symbols

For agents

$ claude mcp add refined-leetcode \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page