Skip to content
This repository was archived by the owner on Apr 25, 2022. It is now read-only.

Commit 6e6e5bd

Browse files
committed
优化播放器
1 parent ec287df commit 6e6e5bd

File tree

13 files changed

+441
-219
lines changed

13 files changed

+441
-219
lines changed

build/cxmooc-tools/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"*://examh5.zhihuishu.com/stuExamWeb.html*",
3939
"*://onlineexamh5new.zhihuishu.com/stuExamWeb.html*",
4040
"*://study.zhihuishu.com/learningNew/videoList*",
41-
"*://*/knowledge/cards?*"
41+
"*://*/ananas/modules/video/index.html?*"
4242
],
4343
"js": [
4444
"src/start.js"

dist/static/query.html

+87-75
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,71 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8-
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
8+
<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
99
<title>cxmooc-tools</title>
1010
</head>
1111
<style>
12-
html,body {
12+
html,
13+
body {
1314
width: 100%;
1415
height: 100%;
1516
margin: 0;
16-
1717
}
1818
/*总盒子*/
19-
.all_box{
20-
background-size:cover;
19+
20+
.all_box {
21+
background-size: cover;
2122
max-width: 1920px;
2223
margin: 0 auto;
2324
padding: 0;
2425
width: 100%;
2526
height: 100%;
26-
background:url(img/bg.jpg) no-repeat center;
27-
background-size:cover;
27+
background: url(img/bg.jpg) no-repeat center;
28+
background-size: cover;
2829
}
30+
2931
.top {
3032
width: 60%;
3133
margin: 0 auto;
3234
height: 100%;
3335
text-align: left;
3436
}
3537
/*搜索盒子*/
38+
3639
.search {
3740
text-align: center;
3841
height: auto;
3942
padding-top: 200px;
4043
background-color: transparent;
4144
position: relative;
4245
}
43-
.search input{
46+
47+
.search input {
4448
height: 40px;
4549
}
4650
/*头部文字*/
47-
.search h2{
51+
52+
.search h2 {
4853
margin-top: 0px;
4954
margin-bottom: 0px;
5055
font-family: 'Open Sans Condensed', sans-serif;
5156
font-weight: 500;
5257
line-height: 1.1;
5358
padding-bottom: 40px;
5459
}
55-
56-
.search h2 span{
60+
61+
.search h2 span {
5762
font-weight: 900;
5863
color: rgba(255, 87, 34, 0.54);
5964
}
60-
65+
6166
.topic:hover,
6267
.topic:focus {
6368
box-shadow: 0px 0px 0px 0.5px #06c4ff;
6469
background-color: #ffffff;
6570
border: 0px;
6671
}
72+
6773
.topic {
6874
transition: all 0.5s;
6975
border: 1px solid #222;
@@ -81,13 +87,15 @@
8187
background: none;
8288
}
8389
/*包含搜索框和图标盒子*/
84-
.input_box{
90+
91+
.input_box {
8592
width: 100%;
8693
height: 100%;
8794
margin: 0;
8895
padding: 0;
8996
position: relative;
9097
}
98+
9199
.icon {
92100
display: inline-block;
93101
width: 18px;
@@ -97,92 +105,93 @@
97105
top: 27%;
98106
cursor: pointer;
99107
}
100-
108+
101109
@media (max-width: 600px) {
102-
/* 下面是分变率改字体*/
103-
.search h2 span{
110+
/* 下面是分变率改字体*/
111+
.search h2 span {
104112
font-size: 15px;
105113
font-weight: 900;
106114
color: rgba(255, 87, 34, 0.54);
107115
}
108-
.search h2{
116+
.search h2 {
109117
font-size: 15px;
110118
}
111-
.all_box a{
119+
.all_box a {
112120
font-size: 15px;
113121
}
114-
.item p{
122+
.item p {
115123
font-size: 15px;
116124
}
117125
/* 下面是分变率改背景图片*/
118-
.all_box{
119-
background:url(img/bg4.jpeg) no-repeat center;
120-
background-size:cover;
126+
.all_box {
127+
background: url(img/bg4.jpeg) no-repeat center;
128+
background-size: cover;
121129
}
122130
}
123-
124131
/*加入我们文字*/
125-
.join_font{
132+
133+
.join_font {
126134
text-decoration: none;
127135
color: #213502;
128136
margin-top: 12px;
129-
display:inline-block;
130-
vertical-align:middle
137+
display: inline-block;
138+
vertical-align: middle
131139
}
132-
.join_font:hover{
140+
141+
.join_font:hover {
133142
color: rgba(255, 87, 34, 0.54);
134143
text-decoration: #a5d7ff;
135144
}
136-
.join_font:hover img{
145+
146+
.join_font:hover img {
137147
filter: none;
138148
opacity: 1;
139149
}
140-
141150
/*加入我们图片*/
142-
.join_font img{
151+
152+
.join_font img {
143153
filter: grayscale(100%);
144154
opacity: 0.66;
145155
padding-left: 10px;
146156
margin-top: 1px;
147-
vertical-align:middle
157+
vertical-align: middle
148158
}
149-
150-
151-
::-webkit-scrollbar {
159+
160+
::-webkit-scrollbar {
152161
width: 6px;
153162
height: 6px;
154163
}
155-
156-
::-webkit-scrollbar-track {
164+
165+
::-webkit-scrollbar-track {
157166
border-radius: 3px;
158167
background: rgba(0, 0, 0, 0.06);
159168
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
160169
}
161-
162-
::-webkit-scrollbar-thumb {
170+
171+
::-webkit-scrollbar-thumb {
163172
border-radius: 3px;
164173
background: rgba(0, 0, 0, 0.12);
165174
-webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
166175
}
167-
176+
168177
.answer {
169178
margin-top: 10px;
170179
width: 100%;
171180
min-height: 100px;
172181
background: #ffffff;
173182
border-radius: 6px;
174183
}
175-
184+
176185
.success {
177186
color: #ff0000;
178187
display: inline-block;
179188
min-width: 33%;
180189
}
181-
190+
182191
.topic-content {
183192
font-size: 18px;
184193
}
185-
194+
186195
.answer {
187196
box-sizing: border-box;
188197
padding: 6px 4px;
@@ -191,62 +200,62 @@
191200
overflow-x: hidden;
192201
display: none;
193202
}
194-
203+
195204
.answer .item {
196205
text-align: left;
197206
}
198-
207+
199208
.answer * {
200209
margin: 0;
201210
}
202-
211+
203212
.answer .item:not(:first-child) {
204213
margin-top: 10px;
205214
}
206215
</style>
207216

208217
<body>
209218
<div class="all_box">
210-
<div class="top">
211-
<div class="search">
212-
<h2>Welcome To <span>超星慕课查找器</span></h2>
213-
<div class="input_box">
214-
<input class="topic" type="text" placeholder="请输入您要搜索的内容">
215-
<svg t="1550848494038" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
216-
p-id="1112" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
219+
<div class="top">
220+
<div class="search">
221+
<h2>Welcome To <span>超星慕课查找器</span></h2>
222+
<div class="input_box">
223+
<input class="topic" type="text" placeholder="请输入您要搜索的内容">
224+
<svg t="1550848494038" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1112" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
217225
<defs>
218226
<style type="text/css"></style>
219227
</defs>
220228
<path
221229
d="M952 896l-204.992-204.992q86.016-106.016 86.016-243.008 0-159.008-112.512-271.488T448.512 64t-272 112.512T64 448.512t112.512 272T448 833.024q136.992 0 242.016-84.992l204.992 204q12 12 28.512 12t28-11.488 11.488-28-11.008-28.512z m-381.984-160Q512 760.992 448 760.992q-63.008 0-120.992-24.992-56-23.008-100-66.016Q184 625.984 160 569.984q-24-58.016-24-122.016 0-63.008 24-120.992 24-56 67.008-99.008 44-44 100-68 58.016-24 120.992-24 64 0 122.016 24 56 24 99.488 67.488T736 326.944q24.992 58.016 24.992 122.016 0 63.008-24.992 120.992-23.008 56-66.016 100-44 43.008-100 66.016z"
222230
p-id="1113"></path>
223231
</svg>
232+
</div>
233+
</div>
234+
<a class="join_font" target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=ab37aa792572befaacbeb5742ff590337403d2660ca1a0d3e44bd98715d44aab">加入我们<img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="超星慕课小工具" title="超星慕课小工具"></a>
235+
<div class="answer">
224236
</div>
225237
</div>
226-
<a class="join_font" target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=ab37aa792572befaacbeb5742ff590337403d2660ca1a0d3e44bd98715d44aab">加入我们<img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="超星刷课不挂感情不翻" title="超星刷课不挂感情不翻"></a>
227-
<div class="answer">
228-
</div>
229-
</div>
230238
</div>
231239
<script>
232-
$('.topic').keydown(function (event) {
240+
$('.topic').keydown(function(event) {
233241
if (event.keyCode == 13) {
234242
queryAnswer();
235243
}
236244
});
237-
$('.icon').click(function () {
245+
$('.icon').click(function() {
238246
queryAnswer();
239247
});
240248

241249
function create() {
242250

243251
}
252+
244253
function queryAnswer() {
245254
$.ajax({
246255
url: 'v2/answer',
247256
method: 'post',
248257
data: 'topic[0]=' + encodeURIComponent($('.topic').val()),
249-
success: function (json) {
258+
success: function(json) {
250259
result = json[0].result;
251260
$('.answer').empty();
252261
for (item in result) {
@@ -257,22 +266,25 @@ <h2>Welcome To <span>超星慕课查找器</span></h2>
257266
html += '<p class="success">';
258267
switch (result[item].type) {
259268
case 1:
260-
case 2: {
261-
html += correct[index].option + ': ' + correct[index].content;
262-
break;
263-
}
264-
case 3: {
265-
if (correct[index].option == true) {
266-
html += '√ ';
267-
} else {
268-
html += '× ';
269+
case 2:
270+
{
271+
html += correct[index].option + ': ' + correct[index].content;
272+
break;
273+
}
274+
case 3:
275+
{
276+
if (correct[index].option == true) {
277+
html += '√ ';
278+
} else {
279+
html += '× ';
280+
}
281+
break;
282+
}
283+
case 4:
284+
{
285+
html += '第' + correct[index].option + '空: ' + correct[index].content;
286+
break;
269287
}
270-
break;
271-
}
272-
case 4: {
273-
html += '第' + correct[index].option + '空: ' + correct[index].content;
274-
break;
275-
}
276288
}
277289
html += '</p>';
278290
}
@@ -289,4 +301,4 @@ <h2>Welcome To <span>超星慕课查找器</span></h2>
289301

290302
</body>
291303

292-
</html>
304+
</html>

0 commit comments

Comments
 (0)