Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
东方怂天
cxmooc-tools
提交
d83ee34c
C
cxmooc-tools
项目概览
东方怂天
/
cxmooc-tools
通知
11
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cxmooc-tools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d83ee34c
编写于
5月 21, 2019
作者:
C
CodFrm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
间隔时间增加随机范围
上级
fa011c2e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
9 deletion
+12
-9
src/config.js
src/config.js
+1
-1
src/cxmooc-tools/chaoxing/chaoxing.js
src/cxmooc-tools/chaoxing/chaoxing.js
+2
-2
src/cxmooc-tools/common.js
src/cxmooc-tools/common.js
+1
-1
src/cxmooc-tools/mooc.js
src/cxmooc-tools/mooc.js
+1
-1
src/server/listen.js
src/server/listen.js
+1
-1
src/tampermonkey/common.js
src/tampermonkey/common.js
+4
-1
src/tampermonkey/cxmooc-pack.js
src/tampermonkey/cxmooc-pack.js
+2
-2
未找到文件。
src/config.js
浏览文件 @
d83ee34c
...
...
@@ -9,7 +9,7 @@ module.exports = {
},
injection
:
''
,
hotversion
:
{
v2_10
:
2.10
,
v2_10
:
2.10
3
,
v2_08
:
2.083
,
v2_07
:
2.071
,
v2_06
:
2.06
,
...
...
src/cxmooc-tools/chaoxing/chaoxing.js
浏览文件 @
d83ee34c
...
...
@@ -79,8 +79,8 @@ module.exports = function () {
*/
function
lazySwitch
(
callback
)
{
//无任务
config
.
auto
&&
self
.
notice
(
config
.
interval
+
"
分钟后插件将自动切换下一节任务
"
);
config
.
auto
&&
common
.
log
(
config
.
interval
+
"
after switch
"
)
config
.
auto
&&
self
.
notice
(
(
config
.
duration
/
60000
).
toFixed
(
2
)
+
"
分钟后插件将自动切换下一节任务
"
);
config
.
auto
&&
common
.
log
(
(
config
.
duration
/
60000
).
toFixed
(
2
)
+
"
after switch
"
)
clearTimeout
(
lastTimeout
);
lastTimeout
=
setTimeout
(
function
()
{
if
(
callback
==
undefined
)
{
...
...
src/cxmooc-tools/common.js
浏览文件 @
d83ee34c
...
...
@@ -363,7 +363,7 @@ export function requestAnswer(topic, platform, page, answer, compile, error, cou
time
=
time
||
2000
;
let
post
=
''
;
for
(
let
i
=
(
page
*
count
),
n
=
0
;
i
<
topic
.
length
&&
n
<
count
;
i
++
,
n
++
)
{
post
+=
'
topic[
'
+
n
+
'
]=
'
+
topic
[
i
].
topic
+
'
&type[
'
+
n
+
'
]=
'
+
topic
[
i
].
type
+
'
&
'
;
post
+=
'
topic[
'
+
n
+
'
]=
'
+
topic
[
i
].
topic
+
'
&type[
'
+
n
+
'
]=
'
+
topic
[
i
].
type
+
'
&
'
;
}
if
(
post
==
''
)
{
compile
&&
compile
();
...
...
src/cxmooc-tools/mooc.js
浏览文件 @
d83ee34c
...
...
@@ -4,5 +4,5 @@ const common = require('./common');
common
.
removeinjected
(
document
);
common
.
serverMessage
(
'
cxconfig
'
,
function
(
param
)
{
global
.
config
[
param
.
key
]
=
param
.
value
global
.
config
[
param
.
key
]
=
param
.
value
;
});
src/server/listen.js
浏览文件 @
d83ee34c
...
...
@@ -45,7 +45,7 @@ app.use(bodyParser.urlencoded({
}));
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'
static
'
),
{
maxage
:
'
7
d
'
maxage
:
'
1
d
'
}));
app
.
get
(
'
/
'
,
function
(
req
,
res
)
{
...
...
src/tampermonkey/common.js
浏览文件 @
d83ee34c
const
common
=
require
(
'
../cxmooc-tools/common
'
)
global
.
config
=
JSON
.
parse
(
localStorage
[
'
config
'
]);
Object
.
defineProperty
(
global
.
config
,
'
duration
'
,
{
get
:
function
()
{
return
(
config
.
interval
||
0.1
)
*
60000
;
let
interval
=
(
config
.
interval
||
0.1
)
*
60000
;
return
common
.
randNumber
(
interval
-
interval
/
2
,
interval
+
interval
*
2
);
}
});
src/tampermonkey/cxmooc-pack.js
浏览文件 @
d83ee34c
...
...
@@ -32,7 +32,7 @@ window.onload = function () {
cx
.
collectExam
();
}
else
if
(
window
.
location
.
href
.
indexOf
(
'
work/doHomeWorkNew
'
)
>
0
)
{
cx
.
homework
();
}
else
if
(
window
.
location
.
href
.
indexOf
(
'
work/selectWorkQuestionYiPiYue
'
)
>
0
)
{
cx
.
collectHomeWork
();
}
else
if
(
window
.
location
.
href
.
indexOf
(
'
work/selectWorkQuestionYiPiYue
'
)
>
0
)
{
cx
.
collectHomeWork
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录