Skip to content

Commit

Permalink
Merge pull request #36 from BaekjoonCord/dev
Browse files Browse the repository at this point in the history
BJCORD 1.5.0
  • Loading branch information
5tarlight authored Aug 20, 2024
2 parents 7502454 + b5e5399 commit 946cd22
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,12 @@
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/5tarlight"><img src="https://avatars.githubusercontent.com/u/45203447?v=100" width="100px;" alt="5tarlight"/><br /><sub><b>YEAHx4</b></sub></a><br />
<a href="#maintenance-5tarlight" title="Maintenance">🚧</a> &
<a href="https://github.com/https://github.com/BaekjoonCord/BJCORD-extension/commits?author=5tarlight" title="Code">💻</a>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/5tarlight"><img src="https://avatars.githubusercontent.com/u/45203447?v=100" width="100px;" alt="5tarlight"/><br /><sub><b>YEAHx4</b></sub></a>
</td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/karpitony"><img src="https://avatars.githubusercontent.com/u/87839885?v=100" width="100px;" alt="karpitony"/><br /><sub><b>Yunseok</b></sub></a><br />
<a href="https://github.com/https://github.com/BaekjoonCord/BJCORD-extension/commits?author=karpitony" title="Documentation">📖</a>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/karpitony"><img src="https://avatars.githubusercontent.com/u/87839885?v=100" width="100px;" alt="karpitony"/><br /><sub><b>Yunseok</b></sub></a>
</td>
<td align="center" valign="top" width="14.28%">
<a href="https://github.com/rdxxer"><img src="https://avatars.githubusercontent.com/u/46419718?v=100" width="100px;" alt="rdxxer"/><br /><b>rdxxer</b></a><br />
<a href="https://github.com/rdxxer"><img src="https://avatars.githubusercontent.com/u/46419718?v=100" width="100px;" alt="rdxxer"/><br /><b>rdxxer</b></a>
</td>
<!-- 당신을 위한 자리--->
<td align="center" valign="top" width="14.28%">
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "백준코드",
"description": "Automatically send BOJ to your discord server",
"homepage_url": "https://github.com/BaekjoonCord/BJCORD-extension",
"version": "1.4.1",
"version": "1.5.0",
"author": "karpitony, YEAHx4",
"action": {
"default_icon": "assets/thumbnail.png",
Expand Down
26 changes: 24 additions & 2 deletions scripts/content/boj.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ function watch() {
const { username, resultCategory } = data;

if (username == getHandle()) {
if (resultCategory == "judging") {
if (
resultCategory === "judging" ||
resultCategory === "wait" ||
resultCategory === "compile"
) {
if (!isJudging) {
isJudging = true;
judgeStartTime = new Date().getTime();
Expand Down Expand Up @@ -112,8 +116,26 @@ function watch() {
const endTime = new Date().getTime();

log("Took " + (endTime - startTime) + "ms");

/** 메시지 전송 결과에 따라 체크 또는 X 표시
* 모든 웹훅이 정상 작동되면 체크 표시
* 웹훅이 아무것도 등록이 안된 경우에는 X로 표시
*/
const statusCell = document.querySelector(
"span.result-text.result-ac"
);

if (statusCell) {
if (success > 0 && failed === 0) {
statusCell.innerHTML += " ✔️";
} else {
if (failed !== 0) statusCell.innerHTML += " ❌";
}
} else {
logErr("Status cell not found. Cannot append status.");
}
})();
}
}
}, 1000);
}, 100);
}

0 comments on commit 946cd22

Please sign in to comment.