diff --git a/src/types.ts b/src/types.ts
index 0f7b4c9..5ec51bb 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -183,7 +183,12 @@ export type SubmitCf = {
export type SubmitCSES = {
command: 'submitCSES';
} & WebviewMessageCommon;
-
+export type SubmitCodeChef = {
+ command: 'submitCodeChef';
+} & WebviewMessageCommon;
+export type SubmitAtcoder = {
+ command: 'submitAtcoder';
+} & WebviewMessageCommon;
export type SubmitKattis = {
command: 'submitKattis';
} & WebviewMessageCommon;
@@ -229,6 +234,8 @@ export type WebviewToVSEvent =
| DeleteTcsCommand
| SubmitCf
| SubmitCSES
+ | SubmitCodeChef
+ | SubmitAtcoder
| OnlineJudgeEnv
| SubmitKattis
| OpenUrl
diff --git a/src/webview/JudgeView.ts b/src/webview/JudgeView.ts
index 8fecde8..d5af717 100644
--- a/src/webview/JudgeView.ts
+++ b/src/webview/JudgeView.ts
@@ -95,6 +95,14 @@ class JudgeViewProvider implements vscode.WebviewViewProvider {
storeSubmitProblem(message.problem);
break;
}
+ case 'submitCodeChef': {
+ storeSubmitProblem(message.problem);
+ break;
+ }
+ case 'submitAtcoder': {
+ storeSubmitProblem(message.problem);
+ break;
+ }
case 'submitKattis': {
submitKattisProblem(message.problem);
break;
diff --git a/src/webview/frontend/App.tsx b/src/webview/frontend/App.tsx
index f0a199a..fb79acd 100644
--- a/src/webview/frontend/App.tsx
+++ b/src/webview/frontend/App.tsx
@@ -422,6 +422,22 @@ function Judge(props: {
setWaitingForSubmit(true);
};
+ const submitCodeChef = () => {
+ sendMessageToVSCode({
+ command: 'submitCodeChef',
+ problem,
+ });
+
+ setWaitingForSubmit(true);
+ };
+ const submitAtcoder = () => {
+ sendMessageToVSCode({
+ command: 'submitAtcoder',
+ problem,
+ });
+
+ setWaitingForSubmit(true);
+ };
const debounceFocusLast = () => {
setTimeout(() => {
setFocusLast(false);
@@ -572,7 +588,9 @@ function Judge(props: {
if (
!url.hostname.endsWith('codeforces.com') &&
url.hostname !== 'open.kattis.com' &&
- !url.hostname.endsWith('cses.fi')
+ !url.hostname.endsWith('cses.fi') &&
+ !url.hostname.endsWith('codechef.com') &&
+ !url.hostname.endsWith('atcoder.jp')
) {
return null;
}
@@ -622,6 +640,24 @@ function Judge(props: {
{t('submit')}
);
+ } else if (url.hostname.endsWith('codechef.com')) {
+ return (
+
+ );
+ } else if (url.hostname.endsWith('atcoder.jp')) {
+ return (
+
+ );
}
};