优化解析

master
宇天 2021-05-07 10:22:49 +08:00
parent 59b5e4da96
commit 65238a97d6
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "io.yutent.gaystat", "name": "io.yutent.gaystat",
"version": "2.1.2", "version": "2.1.3",
"description": "搞基数据", "description": "搞基数据",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -28,6 +28,10 @@ function getJsonp(str) {
} }
function getLineStat(str) { function getLineStat(str) {
str = str.replace(
/.*var syl_1n(.*?)var Data_netWorthTrend([^;]*?);.*/,
'var syl_1n$1var Data_netWorthTrend$2;'
)
return new Function(`${str}; return {line: Data_netWorthTrend.map(it => ({ return new Function(`${str}; return {line: Data_netWorthTrend.map(it => ({
x: ~~(it.x/1000), x: ~~(it.x/1000),
y: +(it.y * 10000).toFixed(0), y: +(it.y * 10000).toFixed(0),