Skip to content

Commit

Permalink
Merge pull request #67 from comfortable-panda/csakai
Browse files Browse the repository at this point in the history
Comfortable Sakaiを移植
  • Loading branch information
das08 authored Dec 22, 2021
2 parents b167fcf + 905bb43 commit f4e8149
Show file tree
Hide file tree
Showing 37 changed files with 9,227 additions and 2,827 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
"prettier"
],
"plugins": [
"@typescript-eslint"
Expand All @@ -16,6 +16,7 @@
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-namespace": "off"
}
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
7 changes: 3 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '19 18 * * 0'
- cron: '30 11 * * 1'

jobs:
analyze:
Expand All @@ -33,9 +33,8 @@ jobs:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# 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
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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


# コンパイル方法
Run
- 初回実行時
```
npm install
```
- Run
```
npx webpack
```

# テスト実行方法
```
npm test
```

# License
Apache-2.0 License
15 changes: 14 additions & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,26 @@ The cache time can be changed in the configuration.
- 2021/05/16 v3.4.1 Fixed minor bugs.
- 2021/05/17 v3.5.0 Support for color universal design.
- 2021/05/17 v3.5.2 Color code assignments with due date more than 14days
- 2021/11/24 v4.0.0 Merged [Comfortable-Sakai](https://github.com/kyoto-u/comfortable-sakai).
Now supports English locale. Re-wrote codes.

# How to compile from source code
Run
- Run
```
npm install
```
for the first time.

- Then Run
```
npx webpack
```
in the root directory of cloned repository.

# How to run tests
```
npm test
```

# License
Apache-2.0 License
44 changes: 44 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"EXTENSION_DESCRIPTION": {"message": "Comfortable PandA is a Web browser extension for managing assignments and quizzes on PandA."},
"tab_assignments": {"message": "Assignments"},
"tab_settings": {"message": "Settings"},
"todo_box_course_name": {"message": "Course Name"},
"todo_box_memo": {"message": "Memo"},
"todo_box_due_date": {"message": "Due Date"},
"todo_box_add": {"message": "Add Memo"},
"quiz": {"message": "Quiz"},
"memo": {"message": "Memo"},
"settings_assignment_cache": {"message": "Assignment Cache [s]"},
"settings_quizzes_cache": {"message": "Test&Quizzes Cache [s]"},
"settings_color_checked_item": {"message": "Color course tabs including checked items"},
"settings_display_late_submit_assignment": {"message": "Show assignments that can be submitted late"},
"settings_reset_colors": {"message": "Reset to default colors"},
"settings_colors_hour": { "message": "Color #$color$ $time$ hours before due",
"placeholders": {
"color": { "content": "$1" },
"time": { "content": "$2" }
}
},
"settings_colors_day": { "message": "Color #$color$ $time$ days before due",
"placeholders": {
"color": { "content": "$1" },
"time": { "content": "$2" }
}
},
"assignment_acquisition_date": {"message": "Assignment Acquisition Date: "},
"testquiz_acquisition_date": {"message": "Test&Quiz Acquisition Date: "},
"due24h": {"message": "Due within 24hrs"},
"due5d": {"message": "Due within 5days"},
"due14d": {"message": "Due within 14days"},
"duePassed": {"message": "Late submission possible"},
"dueOver14d": {"message": "Others"},
"no_available_assignments": {"message": "There are no available assignments :)"},
"remain_time": { "message": "$days$d, $hours$hr, $minutes$min left.",
"placeholders": {
"days": { "content": "$1" },
"hours": { "content": "$2" },
"minutes": { "content": "$3" }
}
},
"due_not_set": {"message": "Due date not set."}
}
44 changes: 44 additions & 0 deletions _locales/ja/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"EXTENSION_DESCRIPTION": {"message":"Comfortable PandAはPandA上の課題やクイズを管理するためのブラウザ拡張機能です。"},
"tab_assignments": {"message": "課題一覧"},
"tab_settings": {"message": "詳細設定"},
"todo_box_course_name": {"message": "講義名"},
"todo_box_memo": {"message": "メモ内容"},
"todo_box_due_date": {"message": "期限"},
"todo_box_add": {"message": "メモを追加"},
"quiz": {"message": "クイズ"},
"memo": {"message": "メモ"},
"settings_assignment_cache": {"message": "課題キャッシュ時間 [秒]"},
"settings_quizzes_cache": {"message": "クイズキャッシュ時間 [秒]"},
"settings_color_checked_item": {"message": "チェック済の課題も色付けする"},
"settings_display_late_submit_assignment": {"message": "遅延提出可能な課題を表示する"},
"settings_reset_colors": {"message": "デフォルト色に戻す"},
"settings_colors_hour": { "message": "カラー #$color$ 締切$time$時間前",
"placeholders": {
"color": { "content": "$1" },
"time": { "content": "$2" }
}
},
"settings_colors_day": { "message": "カラー #$color$ 締切$time$日前",
"placeholders": {
"color": { "content": "$1" },
"time": { "content": "$2" }
}
},
"assignment_acquisition_date": {"message": "課題取得日時: "},
"testquiz_acquisition_date": {"message": "クイズ取得日時: "},
"due24h": {"message": "締め切り24時間以内"},
"due5d": {"message": "締め切り5日以内"},
"due14d": {"message": "締め切り14日以内"},
"duePassed": {"message": "遅延提出可能"},
"dueOver14d": {"message": "その他"},
"no_available_assignments": {"message": "表示できる課題はないよ"},
"remain_time": { "message": "あと$days$日$hours$時間$minutes$分",
"placeholders": {
"days": { "content": "$1" },
"hours": { "content": "$2" },
"minutes": { "content": "$3" }
}
},
"due_not_set": {"message": "締め切り日未設定"}
}
18 changes: 8 additions & 10 deletions public/manifest.json → manifest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"name": "Comfortable PandA",
"description": "Makes our PandA life more comfortable!",
"version": "3.5.2",
"description": "__MSG_EXTENSION_DESCRIPTION__",
"version": "4.0.0",
"manifest_version": 2,
"default_locale": "ja",
"icons": {
"16": "img/icon16.png",
"48": "img/icon48.png",
"128": "img/icon128.png"
},
"browser_action": {
"default_icon": {
"16": "img/icon16.png",
"24": "img/icon24.png",
"32": "img/icon32.png"
},
"default_title": "Comfortable PandA",
"default_popup": "popup.html"
},
Expand All @@ -23,7 +19,7 @@
"content_script.js"
],
"css": [
"css/custom-panda.css"
"css/comfortable-sakai.css"
],
"matches": ["https://panda.ecs.kyoto-u.ac.jp/*"]
}
Expand All @@ -38,8 +34,10 @@
"storage"
],
"web_accessible_resources": [
"css/custom-panda.css",
"css/comfortable-sakai.css",
"img/logo.png",
"img/relaxPanda.png"
"img/relaxPanda.png",
"img/miniSakaiBtn.png",
"views/minisakai.mustache"
]
}
Loading

0 comments on commit f4e8149

Please sign in to comment.