Skip to content

Commit

Permalink
Fix bug of can't load too many courses.
Browse files Browse the repository at this point in the history
  • Loading branch information
Void-JackLee committed Jan 30, 2022
1 parent 17f7b19 commit 9fb2426
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import os

print('Building by webpack...')
os.system('webpack')
os.system('npm run build')
print('Converting to Tampermonkey script...')

f = open('package.json','r',encoding='utf8')
Expand Down
2 changes: 1 addition & 1 deletion dist.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "zf_course_take_assistant",
"version": "1.1.3",
"newVersionDescription": "修复选课成功后刷新后,已选上的课不显示绿色的问题。建议所有用户安装",
"version": "1.1.4",
"newVersionDescription": "修复部分学校课程特别多,无法全部加在至缓存的问题",
"description": "Auto fetch courses.",
"main": "抢课助手.user.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"dev": "webpack --mode development",
"build": "webpack --mode production"
},
"author": "VoidJackLee",
"license": "GPLv2"
Expand Down
Binary file removed pic/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function run() {
load_course = load_course.match(/{[\s\S]*}/)[0];
load_course = load_course.substring(1,load_course.length - 2);
// 修改请求课程数量
load_course = load_course.replace(/var\s+step\s*=\s*.*;/,'var step = 100;\n' +
load_course = load_course.replace(/var\s+step\s*=\s*.*;/,'var step = 5000;\n' +
'\n' +
'$("#jspage").val("0");\n' +
'$("#isEnd").val("false");\n'); // 强制加载
Expand Down
4 changes: 2 additions & 2 deletions 抢课助手.user.js

Large diffs are not rendered by default.

0 comments on commit 9fb2426

Please sign in to comment.