parsedecsig error: TypeError: Cannot read properties of null (reading '0')
graphemecluster opened this issue · 4 comments
graphemecluster commented
好久不見~
Error occurred at:
script content: https://www.youtube.com/s/player/11667490/player_ias.vflset/zh_HK/base.js
Some debug info:
Variable | Value |
---|---|
fnname | Xua |
argname | a |
fnbody | a=a.split("");MC["if"](a,71);MC.pn(a,3);MC.QO(a,27);MC.pn(a,2);MC["if"](a,36);MC.QO(a,14);MC.pn(a,3);MC.QO(a,68);MC.pn(a,3);return a.join("") |
helpername | MC["if"](a,71);MC |
How come the minifier use if
as a property name XD
So I managed to solve that by change helpernameresult
to /;([a-zA-Z0-9$_]+?)\..+?\(/.exec(fnbody)
.
And for safety let's also add _
to fnnameresult
, i.e. /=([a-zA-Z0-9$_]+?)\(decodeURIComponent/.exec(data)
.
maple3142 commented
我自己是沒遇到現版本會遇到問題的狀況,不過既然有機會出現的話我就先更新 Regex 了,感謝!
graphemecluster commented
速い ()
也謝謝你了(有點好奇為什麼在 helpernameresult
要把 $
escape 掉)
maple3142 commented
我猜你想說的是 fnnameresult
?
可能只是我寫那個的時候不太清楚 Regex 哪裡該 escape 吧
graphemecluster commented
對,我說錯了,只是那樣而已(強迫症