Skip to content

Conversation

@Feldan
Copy link

@Feldan Feldan commented Mar 8, 2022

chore: 时间生成修改为json计算

chore: 时间生成修改为json计算
// @compatible firefox
// @license MIT
// @include *://jwgl.*.edu.cn/*
// @include *://172.16.254.1/*
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交到源仓库的作者信息不能完全改成你自己的。

Copy link
Author

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交到源仓库的脚本名成不能完全改成你自己的。可以在原名之后加上(test)

var startDate;

// 全局变量Week的双引射
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

疑似错别字

// --------------------------------------------------------------------------
}

// 导出考试信息
Copy link

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"; // 提醒,默认半小时
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改后的事件提醒提前0秒和注释里的提前半小时冲突

Copy link
Author

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;
    }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

让他关掉这个pull,然后你反复commit,正式pr之前你rebase一下就可以把所有的历史合在一块了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants