File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name LeetCodeRating|显示力扣周赛难度分
33// @namespace https://github.com/zhang-wangz
4- // @version 1.1.8
4+ // @version 1.1.9
55// @license MIT
66// @description LeetCodeRating 力扣周赛分数显现,目前支持tag页面,题库页面和题目页面
77// @author 小东是个阳光蛋(力扣名
2424// @note 2022-09-08 1.1.6 增加描述,更新插件范围为全体界面,在其他界面时删除功能优化性能
2525// @note 2022-09-08 1.1.7 增强数据管理,每天只获取一遍分数数据,优化效率
2626// @note 2022-09-09 1.1.8 修复pb页面点击下一页难度分没有变化的bug
27+ // @note 2022-09-09 1.1.9 修复pb页面当出现会员题,点击上下页出现的bug
2728// ==/UserScript==
2829
2930( function ( ) {
199200 }
200201 try {
201202 let t = document . querySelector ( "#question-detail-main-tabs > div.css-1qqaagl-layer1.css-12hreja-TabContent.e16udao5 > div > div.css-xfm0cl-Container.eugt34i0 > h4 > a" )
203+ if ( t == undefined ) {
204+ t1 = "unknown"
205+ return
206+ }
202207 let data = t . innerText . split ( "." )
203208 let title = data [ data . length - 1 ] . trim ( )
204209 if ( t1 != undefined && t1 == title ) {
207212
208213 let colorSpan = document . querySelector ( "#question-detail-main-tabs > div.css-1qqaagl-layer1.css-12hreja-TabContent.e16udao5 > div > div.css-xfm0cl-Container.eugt34i0 > div > span:nth-child(2)" )
209214 let pa = colorSpan . parentNode
210- console . log ( "le: " + le )
211215 if ( le != undefined && le === colorSpan . parentNode . childNodes . length ) {
212216 if ( t2rate [ title ] != undefined ) {
213217 pa . childNodes [ 2 ] . innerHTML = "难度分: " + t2rate [ title ]
You can’t perform that action at this time.
0 commit comments