Skip to content

Commit f4e8149

Browse files
authored
Merge pull request #67 from comfortable-panda/csakai
Comfortable Sakaiを移植
2 parents b167fcf + 905bb43 commit f4e8149

37 files changed

+9227
-2827
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"plugin:@typescript-eslint/eslint-recommended",
55
"plugin:@typescript-eslint/recommended",
66
"plugin:prettier/recommended",
7-
"prettier/@typescript-eslint"
7+
"prettier"
88
],
99
"plugins": [
1010
"@typescript-eslint"
@@ -16,6 +16,7 @@
1616
"project": "./tsconfig.json"
1717
},
1818
"rules": {
19-
"@typescript-eslint/ban-ts-comment": "off"
19+
"@typescript-eslint/ban-ts-comment": "off",
20+
"@typescript-eslint/no-namespace": "off"
2021
}
2122
}

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
# The branches below must be a subset of the branches above
1919
branches: [ master ]
2020
schedule:
21-
- cron: '19 18 * * 0'
21+
- cron: '30 11 * * 1'
2222

2323
jobs:
2424
analyze:
@@ -33,9 +33,8 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
language: [ 'javascript' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3938

4039
steps:
4140
- name: Checkout repository

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,24 @@ PandAへの負荷を軽減するために課題・クイズ取得にキャッシ
9393
- 2021/05/16 v3.4.3 小さなバグを修正。
9494
- 2021/05/17 v3.5.0 カラーユニバーサルデザインに対応
9595
- 2021/05/17 v3.5.2 締切が14日以上の課題も色付けするように
96+
- 2021/12/22 v4.0.0 [Comfortable-Sakai](https://github.com/kyoto-u/comfortable-sakai) を移植。
97+
英語対応、その他内部処理の改善
98+
9699

97100
# コンパイル方法
98-
Run
101+
- 初回実行時
102+
```
103+
npm install
104+
```
105+
- Run
99106
```
100107
npx webpack
101108
```
102109

110+
# テスト実行方法
111+
```
112+
npm test
113+
```
114+
103115
# License
104116
Apache-2.0 License

README_en.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,26 @@ The cache time can be changed in the configuration.
9696
- 2021/05/16 v3.4.1 Fixed minor bugs.
9797
- 2021/05/17 v3.5.0 Support for color universal design.
9898
- 2021/05/17 v3.5.2 Color code assignments with due date more than 14days
99+
- 2021/11/24 v4.0.0 Merged [Comfortable-Sakai](https://github.com/kyoto-u/comfortable-sakai).
100+
Now supports English locale. Re-wrote codes.
99101

100102
# How to compile from source code
101-
Run
103+
- Run
104+
```
105+
npm install
106+
```
107+
for the first time.
108+
109+
- Then Run
102110
```
103111
npx webpack
104112
```
105113
in the root directory of cloned repository.
106114

115+
# How to run tests
116+
```
117+
npm test
118+
```
119+
107120
# License
108121
Apache-2.0 License

_locales/en/messages.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"EXTENSION_DESCRIPTION": {"message": "Comfortable PandA is a Web browser extension for managing assignments and quizzes on PandA."},
3+
"tab_assignments": {"message": "Assignments"},
4+
"tab_settings": {"message": "Settings"},
5+
"todo_box_course_name": {"message": "Course Name"},
6+
"todo_box_memo": {"message": "Memo"},
7+
"todo_box_due_date": {"message": "Due Date"},
8+
"todo_box_add": {"message": "Add Memo"},
9+
"quiz": {"message": "Quiz"},
10+
"memo": {"message": "Memo"},
11+
"settings_assignment_cache": {"message": "Assignment Cache [s]"},
12+
"settings_quizzes_cache": {"message": "Test&Quizzes Cache [s]"},
13+
"settings_color_checked_item": {"message": "Color course tabs including checked items"},
14+
"settings_display_late_submit_assignment": {"message": "Show assignments that can be submitted late"},
15+
"settings_reset_colors": {"message": "Reset to default colors"},
16+
"settings_colors_hour": { "message": "Color #$color$ $time$ hours before due",
17+
"placeholders": {
18+
"color": { "content": "$1" },
19+
"time": { "content": "$2" }
20+
}
21+
},
22+
"settings_colors_day": { "message": "Color #$color$ $time$ days before due",
23+
"placeholders": {
24+
"color": { "content": "$1" },
25+
"time": { "content": "$2" }
26+
}
27+
},
28+
"assignment_acquisition_date": {"message": "Assignment Acquisition Date: "},
29+
"testquiz_acquisition_date": {"message": "Test&Quiz Acquisition Date: "},
30+
"due24h": {"message": "Due within 24hrs"},
31+
"due5d": {"message": "Due within 5days"},
32+
"due14d": {"message": "Due within 14days"},
33+
"duePassed": {"message": "Late submission possible"},
34+
"dueOver14d": {"message": "Others"},
35+
"no_available_assignments": {"message": "There are no available assignments :)"},
36+
"remain_time": { "message": "$days$d, $hours$hr, $minutes$min left.",
37+
"placeholders": {
38+
"days": { "content": "$1" },
39+
"hours": { "content": "$2" },
40+
"minutes": { "content": "$3" }
41+
}
42+
},
43+
"due_not_set": {"message": "Due date not set."}
44+
}

_locales/ja/messages.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"EXTENSION_DESCRIPTION": {"message":"Comfortable PandAはPandA上の課題やクイズを管理するためのブラウザ拡張機能です。"},
3+
"tab_assignments": {"message": "課題一覧"},
4+
"tab_settings": {"message": "詳細設定"},
5+
"todo_box_course_name": {"message": "講義名"},
6+
"todo_box_memo": {"message": "メモ内容"},
7+
"todo_box_due_date": {"message": "期限"},
8+
"todo_box_add": {"message": "メモを追加"},
9+
"quiz": {"message": "クイズ"},
10+
"memo": {"message": "メモ"},
11+
"settings_assignment_cache": {"message": "課題キャッシュ時間 [秒]"},
12+
"settings_quizzes_cache": {"message": "クイズキャッシュ時間 [秒]"},
13+
"settings_color_checked_item": {"message": "チェック済の課題も色付けする"},
14+
"settings_display_late_submit_assignment": {"message": "遅延提出可能な課題を表示する"},
15+
"settings_reset_colors": {"message": "デフォルト色に戻す"},
16+
"settings_colors_hour": { "message": "カラー #$color$ 締切$time$時間前",
17+
"placeholders": {
18+
"color": { "content": "$1" },
19+
"time": { "content": "$2" }
20+
}
21+
},
22+
"settings_colors_day": { "message": "カラー #$color$ 締切$time$日前",
23+
"placeholders": {
24+
"color": { "content": "$1" },
25+
"time": { "content": "$2" }
26+
}
27+
},
28+
"assignment_acquisition_date": {"message": "課題取得日時: "},
29+
"testquiz_acquisition_date": {"message": "クイズ取得日時: "},
30+
"due24h": {"message": "締め切り24時間以内"},
31+
"due5d": {"message": "締め切り5日以内"},
32+
"due14d": {"message": "締め切り14日以内"},
33+
"duePassed": {"message": "遅延提出可能"},
34+
"dueOver14d": {"message": "その他"},
35+
"no_available_assignments": {"message": "表示できる課題はないよ"},
36+
"remain_time": { "message": "あと$days$日$hours$時間$minutes$分",
37+
"placeholders": {
38+
"days": { "content": "$1" },
39+
"hours": { "content": "$2" },
40+
"minutes": { "content": "$3" }
41+
}
42+
},
43+
"due_not_set": {"message": "締め切り日未設定"}
44+
}
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
22
"name": "Comfortable PandA",
3-
"description": "Makes our PandA life more comfortable!",
4-
"version": "3.5.2",
3+
"description": "__MSG_EXTENSION_DESCRIPTION__",
4+
"version": "4.0.0",
55
"manifest_version": 2,
6+
"default_locale": "ja",
67
"icons": {
78
"16": "img/icon16.png",
89
"48": "img/icon48.png",
910
"128": "img/icon128.png"
1011
},
1112
"browser_action": {
12-
"default_icon": {
13-
"16": "img/icon16.png",
14-
"24": "img/icon24.png",
15-
"32": "img/icon32.png"
16-
},
1713
"default_title": "Comfortable PandA",
1814
"default_popup": "popup.html"
1915
},
@@ -23,7 +19,7 @@
2319
"content_script.js"
2420
],
2521
"css": [
26-
"css/custom-panda.css"
22+
"css/comfortable-sakai.css"
2723
],
2824
"matches": ["https://panda.ecs.kyoto-u.ac.jp/*"]
2925
}
@@ -38,8 +34,10 @@
3834
"storage"
3935
],
4036
"web_accessible_resources": [
41-
"css/custom-panda.css",
37+
"css/comfortable-sakai.css",
4238
"img/logo.png",
43-
"img/relaxPanda.png"
39+
"img/relaxPanda.png",
40+
"img/miniSakaiBtn.png",
41+
"views/minisakai.mustache"
4442
]
4543
}

0 commit comments

Comments
 (0)