Skip to content

Commit

Permalink
Merge pull request #2 from whaliendev/dev
Browse files Browse the repository at this point in the history
Bugs and enhancement required in v1.1.4
  • Loading branch information
whaliendev authored Sep 15, 2021
2 parents 6d1b893 + fb4dc75 commit a7141c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
justify-content: space-between;
position: sticky;
top: 27px;
z-index: 100;
z-index: 1005;
border: 1px solid #dddddd;
}

.x-controls-container.is-pinned {
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.26);
z-index: 1080;
}

.x-controls-container .x-show-info {
Expand Down Expand Up @@ -147,7 +148,7 @@
transition: all 0.3s cubic-bezier(0.2, -0.25, 0.7, 1.25);
}

.x-overlay.x-open .x-modal{
.x-overlay.x-open .x-modal {
transform: translateY(0);
opacity: 1;
}
Expand Down
18 changes: 9 additions & 9 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function customDynamicUI() {
function customStaticUI(catsList) {
$('#topButton')[0].onclick = null;
$('#search_go').before(`
<button class="x-button btn btn-primary btn-sm" id="x-sel-all">全选</button>
<button class="x-button btn btn-primary btn-sm" id="x-sel-all">全不选</button>
<button class="x-button btn btn-primary btn-sm" id="x-sel-rev">反选</button>
<button class="x-button btn btn-primary btn-sm" id="x-sel-revert">复原</button>
<button class="x-button btn btn-primary btn-sm" id="x-show-graph">图表</button>
Expand Down Expand Up @@ -372,11 +372,11 @@ function processData(creditsMap, trendingArray) {
.map((cat) => [cat[0], cat[1].toFixed(1)]);
recordDataset = trendingArray.map((sem) => [
sem[0],
sem[1].toFixed(1),
sem[2].toFixed(3),
sem[3].toFixed(2),
sem[4].toFixed(3),
sem[5].toFixed(2)
sem[1].toFixed(1), // 学期学分数
sem[2].toFixed(3), // 学期GPA
sem[3].toFixed(2), // 学期平均分
sem[4].toFixed(3), // 累积GPA
sem[5].toFixed(2) // 累积平均分
]);
}

Expand Down Expand Up @@ -444,7 +444,7 @@ function calcGPA(scores) {
scoreMean = totalScore / totalCredits;
}

return [totalCredits.toFixed(1), GPAMean.toFixed(3), scoreMean.toFixed(2)];
return [totalCredits.toFixed(1), GPAMean.toFixed(3), scoreMean.toFixed(3)];
}

/**
Expand Down Expand Up @@ -539,11 +539,11 @@ function updateAllScores() {
/******************************** 图表 ************************************* */
// 学分按课程类别的数组
// Array[category, credits count]
let creditsDataset = [];
let creditsDataset = [];

// 每学期的成绩记录数组
// Array of Array[semester, credits count, average GPa, cumu GPA, average score, cumu score]
let recordDataset = [];
let recordDataset = [];

/**
* 绘制学分按课程类别分类的bar图,方便选课的时候用
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "武汉大学成绩助手X",
"description": "新教务系统也很难用,试试这个吧!",
"version": "1.0.0",
"version": "1.1.5",
"manifest_version": 3,
"host_permissions": [
"https://jwgl.whu.edu.cn/*"
Expand Down

0 comments on commit a7141c6

Please sign in to comment.