Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
东方怂天
cxmooc-tools
提交
5ce7f776
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 搜索 >>
提交
5ce7f776
编写于
5月 21, 2019
作者:
C
CodFrm
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'hotfix' into featured
# Conflicts: # src/config.js # src/cxmooc-tools/common.js
上级
d83ee34c
62c53964
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
59 addition
and
33 deletion
+59
-33
src/config.js
src/config.js
+12
-4
src/cxmooc-tools/chaoxing/exam.js
src/cxmooc-tools/chaoxing/exam.js
+13
-5
src/cxmooc-tools/chaoxing/video.js
src/cxmooc-tools/chaoxing/video.js
+20
-8
src/cxmooc-tools/common.js
src/cxmooc-tools/common.js
+6
-7
src/cxmooc-tools/html/popup.html
src/cxmooc-tools/html/popup.html
+2
-2
src/cxmooc-tools/zhihuishu/topic.js
src/cxmooc-tools/zhihuishu/topic.js
+3
-3
src/tampermonkey/cxmooc.js
src/tampermonkey/cxmooc.js
+3
-4
未找到文件。
src/config.js
浏览文件 @
5ce7f776
module
.
exports
=
{
url
:
"
http://cx.icodef.com/
"
,
version
:
2.1
0
,
url
:
"
http
s
://cx.icodef.com/
"
,
version
:
2.1
1
,
update
:
'
https://github.com/CodFrm/cxmooc-tools/releases
'
,
enforce
:
false
,
cx
:
{
...
...
@@ -15,8 +15,16 @@ module.exports = {
v2_06
:
2.06
,
},
getHotVersion
:
function
(
ver
)
{
let
dealver
=
'
v
'
+
(
''
+
ver
||
this
.
version
).
replace
(
'
.
'
,
'
_
'
);
let
dealver
=
'
v
'
+
pushZero
(
ver
||
this
.
version
).
replace
(
'
.
'
,
'
_
'
);
hotversion
=
this
.
hotversion
[
dealver
]
||
this
.
version
;
return
hotversion
;
}
}
\ No newline at end of file
}
function
pushZero
(
num
)
{
num
=
""
+
num
;
for
(;
num
.
length
<
4
;)
{
num
=
num
+
"
0
"
;
}
return
num
;
}
src/cxmooc-tools/chaoxing/exam.js
浏览文件 @
5ce7f776
...
...
@@ -84,7 +84,7 @@ module.exports = {
switch
(
topic
.
type
)
{
case
1
:
case
2
:
{
let
options
=
$
(
topic
.
options
).
find
(
'
input
'
);
let
options
=
$
(
topic
.
options
).
find
(
'
li
input
'
);
let
noticText
=
this
.
fillSelect
(
options
,
correct
);
common
.
signleLine
(
noticText
,
'
answer
'
+
topic
.
index
,
undefined
,
topic
.
options
);
break
;
...
...
@@ -143,12 +143,20 @@ module.exports = {
fillSelect
:
function
(
options
,
correct
)
{
let
noticText
=
''
;
$
(
options
).
removeAttr
(
'
checked
'
);
let
optionContent
=
$
(
'
.Cy_ulTop.w-top li div
'
);
if
(
optionContent
.
length
<=
0
)
{
optionContent
=
$
(
options
).
parents
(
'
li
'
).
find
(
'
a
'
);
}
for
(
let
i
=
0
;
i
<
correct
.
length
;
i
++
)
{
let
index
=
(
correct
[
i
].
option
.
charCodeAt
()
|
32
)
-
97
;
$
(
options
[
index
]).
click
();
noticText
+=
correct
[
i
].
option
+
'
:
'
+
correct
[
i
].
content
+
'
<br/>
'
;
for
(
let
n
=
0
;
n
<
options
.
length
;
n
++
)
{
let
option
=
common
.
removeHTML
(
$
(
optionContent
[
n
]).
html
());
if
(
option
==
correct
[
i
].
option
)
{
$
(
options
[
n
]).
click
();
noticText
+=
correct
[
i
].
option
+
'
:
'
+
correct
[
i
].
content
+
'
<br/>
'
;
}
}
}
return
noticText
;
return
noticText
||
'
没有符合的答案
'
;
},
fillJudge
:
function
(
options
,
correct
)
{
$
(
options
).
removeAttr
(
'
checked
'
);
...
...
src/cxmooc-tools/chaoxing/video.js
浏览文件 @
5ce7f776
...
...
@@ -72,21 +72,33 @@ module.exports = function () {
}
}
initVideoTopic
();
initCdn
(
self
.
video
);
//
initCdn(self.video);
//点击切换记录cdn
$
(
self
.
document
).
find
(
"
[title='Playline']+.vjs-menu .vjs-menu-content .vjs-menu-item-text
"
).
click
(
function
()
{
localStorage
[
'
cdn
'
]
=
$
(
this
).
text
();
});
//失败的切换记录
$
(
self
.
document
).
find
(
'
.vjs-error-display.vjs-modal-dialog
'
).
on
(
'
click
'
,
'
.ans-vjserrdisplay-opts li.ans-vjserrdisplay-opt label"
'
,
function
()
{
localStorage
[
'
cdn
'
]
=
$
(
this
).
text
();
});
//
$(self.document).find("[title='Playline']+.vjs-menu .vjs-menu-content .vjs-menu-item-text").click(function () {
//
localStorage['cdn'] = $(this).text();
//
});
//
//
失败的切换记录
//
$(self.document).find('.vjs-error-display.vjs-modal-dialog').on('click', '.ans-vjserrdisplay-opts li.ans-vjserrdisplay-opt label"', function () {
//
localStorage['cdn'] = $(this).text();
//
});
let
play
=
function
()
{
//静音和倍速选项
self
.
video
.
muted
=
config
.
video_mute
;
self
.
video
.
playbackRate
=
config
.
video_multiple
;
let
cdn
=
self
.
video
.
currentSrc
;
cdn
=
cdn
.
substr
(
0
,
cdn
.
indexOf
(
'
/video/
'
,
10
));
localStorage
[
'
cdn_url
'
]
=
cdn
;
self
.
loadover
&&
self
.
loadover
(
self
);
}
/**
* 对cdn进行处理
*/
if
(
localStorage
[
'
cdn_url
'
]
!=
undefined
)
{
let
url
=
self
.
video
.
src
;
url
=
url
.
substr
(
url
.
indexOf
(
'
/video/
'
));
self
.
video
.
src
=
localStorage
[
'
cdn_url
'
]
+
url
;
}
$
(
self
.
video
).
on
(
'
loadstart
'
,
play
);
$
(
self
.
video
).
on
(
'
pause
'
,
function
()
{
...
...
src/cxmooc-tools/common.js
浏览文件 @
5ce7f776
...
...
@@ -94,11 +94,11 @@ export function removeHTML(html) {
* @param {*} topic
*/
function
dealSymbol
(
topic
)
{
topic
=
topic
.
replace
(
'
,
'
,
'
,
'
);
topic
=
topic
.
replace
(
'
(
'
,
'
(
'
);
topic
=
topic
.
replace
(
'
)
'
,
'
)
'
);
topic
=
topic
.
replace
(
'
?
'
,
'
?
'
);
topic
=
topic
.
replace
(
'
:
'
,
'
:
'
);
topic
=
topic
.
replace
(
/,/g
,
'
,
'
);
topic
=
topic
.
replace
(
/(/g
,
'
(
'
);
topic
=
topic
.
replace
(
/)/g
,
'
)
'
);
topic
=
topic
.
replace
(
/?/g
,
'
?
'
);
topic
=
topic
.
replace
(
/:/g
,
'
:
'
);
topic
=
topic
.
replace
(
/
[
“”
]
/g
,
'
"
'
);
return
topic
;
}
...
...
@@ -433,8 +433,7 @@ export function fillAnswer(topic, answer, fill, findOption) {
export
function
fillSelect
(
options
,
correct
,
isTrue
)
{
let
noticText
=
''
;
for
(
let
i
=
0
;
i
<
correct
.
length
;
i
++
)
{
isTrue
(
options
,
correct
[
i
],
2
);
noticText
+=
correct
[
i
].
option
+
'
:
'
+
correct
[
i
].
content
+
'
<br/>
'
;
noticText
+=
isTrue
(
options
,
correct
[
i
],
2
)
+
'
:
'
+
correct
[
i
].
content
+
'
<br/>
'
;
}
return
noticText
;
}
...
...
src/cxmooc-tools/html/popup.html
浏览文件 @
5ce7f776
...
...
@@ -562,10 +562,10 @@
<h4
class=
"one_title"
>
<div
class=
"one_title_show"
>
<span>
插件配置:
</span>
<button
id=
"dama"
class=
"button button--tamaya button--border-thick"
data-text=
"打码设置"
>
打码设置
</button>
<button
id=
"dama"
style=
"display: none"
class=
"button button--tamaya button--border-thick"
data-text=
"打码设置"
>
打码设置
</button>
<input
type=
"text"
class=
"input_text edit"
placeholder=
"token"
config-key=
"vtoken"
>
</div>
<div
id=
"dama-config"
>
<div
id=
"dama-config"
style=
"display: none"
>
<span>
若快打码设置:
</span>
<p
class=
"comment"
>
请自行注册若快购买进行配置
</p>
<input
type=
"text"
class=
"input_text edit"
config-key=
"ruokuai_user"
placeholder=
"若快账号"
style=
"height: 17px;"
>
...
...
src/cxmooc-tools/zhihuishu/topic.js
浏览文件 @
5ce7f776
...
...
@@ -54,7 +54,7 @@ module.exports = {
let
tmpContent
=
common
.
removeHTML
(
$
(
options
[
i
]).
html
());
if
(
tmpContent
==
correct
.
content
)
{
$
(
options
[
i
]).
parent
().
find
(
'
input
'
).
click
();
return
true
;
return
$
(
options
[
i
]).
text
()
;
}
}
}
...
...
@@ -94,7 +94,7 @@ module.exports = {
common
.
oaForEach
(
correct
,
function
(
item2
)
{
if
(
common
.
numToZh
(
index
+
1
)
==
item2
.
option
)
{
$
(
item
).
val
(
item2
.
content
);
retNotic
+=
'
第
'
+
item2
.
option
+
'
空:
'
+
item2
.
content
+
'
<br/>
'
;
retNotic
+=
'
第
'
+
item2
.
option
+
'
空:
'
+
item2
.
content
+
'
<br/>
'
;
}
});
});
...
...
@@ -105,7 +105,7 @@ module.exports = {
if
(
text
==
''
)
{
return
common
.
signleLine
(
'
没有合适的答案
'
,
'
answer
'
+
index
,
undefined
,
topic
.
options
);;
}
common
.
signleLine
(
text
,
'
answer
'
+
index
,
undefined
,
topic
.
options
[
topic
.
options
.
length
-
1
]);
common
.
signleLine
(
text
,
'
answer
'
+
index
,
undefined
,
topic
.
options
[
topic
.
options
.
length
-
1
]);
},
()
=>
{
$
(
self
.
btn
).
text
(
'
搜索完成
'
);
},
()
=>
{
$
(
self
.
btn
).
text
(
'
网络错误
'
);
},
...
...
src/tampermonkey/cxmooc.js
浏览文件 @
5ce7f776
// ==UserScript==
// @name 超星慕课小工具
// @namespace https://github.com/CodFrm/cxmooc-tools
// @version
2.0.8
// @version
2.10
// @description 一个超星慕课刷课工具,火狐,谷歌,油猴支持.全自动任务,视频倍速秒过,作业考试题库,验证码自动打码(੧ᐛ੭挂科模式,启动)
// @author CodFrm
// @match *://*/mycourse/studentstudy?*
...
...
@@ -10,6 +10,8 @@
// @match *://*/html/processVerify.ac?*
// @match *://*/exam/test/reVersionPaperMarkContentNew?*
// @match *://*/exam/test/reVersionTestStartNew?*
// @match *://*/work/selectWorkQuestionYiPiYue?*
// @match *://*/work/doHomeWorkNew?*
// @grant GM_xmlhttpRequest
// @license MIT
// ==/UserScript==
...
...
@@ -22,9 +24,6 @@ let config = {
video_multiple
:
1
,
//视频播放倍速,视频播放的倍数,建议不要改动,为1即可,这是危险的功能
video_mute
:
true
,
//视频静音,视频自动静音播放
vtoken
:
"
user
"
,
//鉴权token
is_ruokuai
:
false
,
//使用若快打码
ruokuai_user
:
""
,
//若快打码账号
ruokuai_pwd
:
""
//若快打码密码
};
localStorage
[
'
config
'
]
=
JSON
.
stringify
(
config
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录