-
Notifications
You must be signed in to change notification settings - Fork 37
Update ZhengFangClassScheduleToICS.js #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
chore: 时间生成修改为json计算
| // @compatible firefox | ||
| // @license MIT | ||
| // @include *://jwgl.*.edu.cn/* | ||
| // @include *://172.16.254.1/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议这一行要改回之前通用的,至少要加上一个修改成自己学校教务系统的提示,不能仅用对自己有效的修改来污染仓库的代码,另外这样的修改也将自己的所在学校泄露了,也不太安全。
| // @version 0.1 | ||
| // @description 通过对新版正方教务系统的课表页面的解析,实现导出一个适用于大部分ics日历的文件,理论使用于所有使用新版正方教务系统(可对 ``include`` 进行一定的修改以适用不同的学校的链接) | ||
| // @author 31415926535x | ||
| // @supportURL https://github.com/31415926535x/CollegeProjectBackup/blob/master/ZhengfangClassScheduleToICS/Readme.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提交到源仓库的作者信息不能完全改成你自己的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry!谢谢指点 XD
| @@ -1,14 +1,13 @@ | |||
| // ==UserScript== | |||
| // @name 新版正方教务系统导出课程表 | |||
| // @name test | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提交到源仓库的脚本名成不能完全改成你自己的。可以在原名之后加上(test)。
| var startDate; | ||
|
|
||
| // 全局变量Week的双引射 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
疑似错别字
| // -------------------------------------------------------------------------- | ||
| } | ||
|
|
||
| // 导出考试信息 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么删除了导出考试信息的功能,这是破坏性更新,应该把这个加回来。
| Calendar.TIMEZONE = "Asia/Shanghai" // 时区,默认是上海 | ||
| Calendar.ISVALARM = true; // 提醒,默认是开启 | ||
| Calendar.VALARM = "-P0DT0H30M0S"; // 提醒,默认半小时 | ||
| Calendar.VALARM = "-P0DT0H0M0S"; // 提醒,默认半小时 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改后的事件提醒提前0秒和注释里的提前半小时冲突
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实还有个错误,但是不太会用git。还有个bug是时间生成那里函数getTime(num, StartOrEnd),本来还想继续提交分支的,但是好丢人啊。LOL!
function getTime(num, StartOrEnd) {
var hour = TIME[num].startTime.hour;
var minute = parseInt(TIME[num].startTime.minute) + StartOrEnd;
if (minute >= 60) {
minute = minute - 60;
hour = parseInt(hour) + 1;
}
var time = "" + getFixedLen("" + hour,2) + getFixedLen("" + minute,2) + "00";
console.log(time)
return time;
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
让他关掉这个pull,然后你反复commit,正式pr之前你rebase一下就可以把所有的历史合在一块了。
chore: 时间生成修改为json计算