Skip to content

Commit 8f62f1e

Browse files
committed
fix #5: subject editing issue
set default to grade 2025
1 parent c3f2edb commit 8f62f1e

File tree

4 files changed

+16
-47
lines changed

4 files changed

+16
-47
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
### type:考试类型
1212

13-
`24`:高三日常;`241`:高三理科;`242`:高三文科
13+
`25`:高二日常
1414

1515
`251`:高二理科;`252`:高二文科;
1616

index.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ <h2 id="mainslogan">考试时钟</h2>
9797
</div>
9898
</a>
9999
<div id="typelist" style="width:100%;">
100-
<a onclick="subject.switch(24)">高三日常</a>
101-
<a onclick="subject.switch(241)">高三理科</a>
102-
<a onclick="subject.switch(242)">高三文科</a>
100+
<a onclick="subject.switch(25)">高二日常</a>
103101
<a onclick="subject.switch(251)">高二物理</a>
104102
<a onclick="subject.switch(252)">高二历史</a>
105103
<a onclick="subject.switch(253)">高二模考<span class="shield">每日循环</span></a>
@@ -172,18 +170,18 @@ <h2 id="mainslogan">考试时钟</h2>
172170

173171
<b class="card">
174172
<div>
175-
<div id="subject" contenteditable>科目</div>
176-
<div id="duration">16:66~17:77</div>
173+
<span id="subject" contenteditable>科目</span>
174+
<span id="duration">16:66~17:77</span>
177175
</div>
178176
<div>
179-
<div id="clock">18:88</div>
177+
<span id="clock">18:88</span>
180178
</div>
181179
<div>
182-
<div>
180+
<span>
183181
<span id="timer">199</span>
184182
<span class="dim" id="timersub">sub</span>
185-
</div>
186-
<div id="activity">当前活动</div>
183+
</span>
184+
<span id="activity">当前活动</span>
187185
</div>
188186
<!-- <div><br><br><br>test<br><br><br></div> -->
189187
</b>
@@ -217,7 +215,7 @@ <h2 id="mainslogan">考试时钟</h2>
217215
更新于 <span id="lastCommit">(获取中)</span></a>
218216
</p>
219217
<p><i class="fa-solid fa-file-arrow-up"></i>
220-
V 7.3.4 移除部分调试工具
218+
V 7.3.5 修复科目改名bug
221219
</p>
222220
</div>
223221
</footer>

js/exam.js

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ console.groupEnd();
66
*/
77

88
let specialDate = {
9-
gone22: parseInt((Date.now() - new Date(2022, 5, 9)) / 864E5),
10-
cee24: parseInt((new Date(2024, 5, 8) - Date.now()) / 864E5),
9+
cee25: parseInt((new Date(2025, 5, 8) - Date.now()) / 864E5),
1110
}
1211

1312
exams["2022-05-14"] = {
@@ -18,12 +17,12 @@ exams["2022-05-14"] = {
1817
}
1918
};
2019

21-
exams[24] = {
22-
type: "高三日常",
20+
exams[25] = {
21+
type: "高二日常",
2322
author: "招募“高三日常”维护者",
24-
origin: "2024级年级部",
25-
mainSlogan: `距离高考${specialDate.cee24}天`,
26-
rollSlogan: ["一会三年", "别也多年", "多会多别", "何年再会"],
23+
origin: "2025级年级部",
24+
mainSlogan: `距离高考${specialDate.cee25}天`,
25+
rollSlogan: [""],
2726
earlyAdmit: 2,
2827
schedule() {
2928
// 夏季作息时间,上午竟然要上五节课
@@ -59,34 +58,6 @@ exams[24] = {
5958
}
6059
}
6160
}
62-
exams[241] = {
63-
type: "高三理科",
64-
author: "招募“高三理科”维护者",
65-
origin: "2024级年级部",
66-
rollSlogan: ["高二第一学期期末暨模块结业考试(理科):请以实际铃声为准。"],
67-
schedule() {
68-
$("数学", "2023-01-29", "14:00", "16:00");
69-
$("化学", "2023-01-29", "16:30", "18:10");
70-
$("语文", "2023-01-30", "07:40", "10:10");
71-
$("生物", "2023-01-30", "10:40", "12:20");
72-
$("英语", "2023-01-30", "14:00", "16:00");
73-
$("物理", "2023-01-30", "16:30", "18:00");
74-
}
75-
};
76-
exams[242] = {
77-
type: "高三文科",
78-
author: "招募“高三文科”维护者",
79-
origin: "2024级年级部",
80-
rollSlogan: ["高二第一学期期末暨模块结业考试(文科):请以实际铃声为准。"],
81-
schedule() {
82-
$("数学", "2023-01-29", "14:00", "16:00");
83-
$("历史", "2023-01-29", "16:30", "18:10");
84-
$("语文", "2023-01-30", "07:40", "10:10");
85-
$("地理", "2023-01-30", "10:40", "12:20");
86-
$("英语", "2023-01-30", "14:00", "16:00");
87-
$("政治", "2023-01-30", "16:30", "18:00");
88-
}
89-
};
9061
exams[251] = {
9162
type: "高二物理",
9263
author: "",

js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (SP.type in exams) subject.switch(SP.type);
5757
if (today.date in exams) subject.switch(today.date);
5858
else if (today.date.match("2023-01-1(6|7)")) subject.switch(231);
5959
// 最后设置缺省考试类型
60-
else subject.switch(24);
60+
else subject.switch(25);
6161
// 若不再包一层,slogan.update内的this就会指向window
6262
setInterval(function () { slogan.update(); }, 3000);
6363

0 commit comments

Comments
 (0)