Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unbyte/mooc-assistant
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: unbyte/mooc-assistant
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Feb 20, 2020

  1. fix(storage.ts): change the way to load data

    `extractConfig(await getStorage())` => `await getConfig()`
    specify the default data directly in the
    parameter when call `browser.storage.sync.get` instead of reassigning after getting
    
    fix #1
    unbyte committed Feb 20, 2020
    Copy the full SHA
    2773e5b View commit details
  2. chore(release): 2.0.1

    unbyte committed Feb 20, 2020
    Copy the full SHA
    0658cf2 View commit details

Commits on Feb 25, 2020

  1. fix(evaluator.less): fix dislocation of inputs in Firefox

    add width attribute to cover default style in Firefox
    unbyte committed Feb 25, 2020
    Copy the full SHA
    7410669 View commit details
  2. feat: add support for ulearning

    - add function of fetching answers of test
    - add function of adjusting the rate of video player
    - modify some text
    - `NumberInput` from `Evaluator.tsx` to separate file
    unbyte committed Feb 25, 2020
    Copy the full SHA
    04ca2ba View commit details
  3. chore(release): 2.1.0

    unbyte committed Feb 25, 2020
    Copy the full SHA
    7feda8f View commit details
  4. Copy the full SHA
    e0006e0 View commit details
  5. chore(license): correct wrong name of license

    `LICENCE` => `LICENSE`
    unbyte committed Feb 25, 2020
    Copy the full SHA
    8a54922 View commit details

Commits on Feb 26, 2020

  1. chore(license): correct clerical errors

    `content (c)` => `Copyright (c)`
    unbyte committed Feb 26, 2020
    Copy the full SHA
    761f0f4 View commit details

Commits on Apr 5, 2020

  1. chore(deps): bump acorn from 6.4.0 to 6.4.1

    Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
    - [Release notes](https://github.com/acornjs/acorn/releases)
    - [Commits](acornjs/acorn@6.4.0...6.4.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Apr 5, 2020
    Copy the full SHA
    d5bb719 View commit details

Commits on Apr 7, 2020

  1. Merge pull request #3 from unbyte/dependabot/npm_and_yarn/acorn-6.4.1

    chore(deps): bump acorn from 6.4.0 to 6.4.1
    unbyte authored Apr 7, 2020
    Copy the full SHA
    4c3d51f View commit details

Commits on Apr 25, 2020

  1. refactor: compile and bundle

    also update dependencies
    unbyte committed Apr 25, 2020
    Copy the full SHA
    86aa422 View commit details
  2. Merge remote-tracking branch 'origin/master'

    # Conflicts:
    #	package-lock.json
    unbyte committed Apr 25, 2020
    Copy the full SHA
    34adcdd View commit details

Commits on May 20, 2020

  1. Copy the full SHA
    9f4cca5 View commit details
  2. chore(release): 2.1.1

    unbyte committed May 20, 2020
    Copy the full SHA
    daef2d6 View commit details

Commits on May 21, 2020

  1. chore(changelog): update

    unbyte committed May 21, 2020
    Copy the full SHA
    ac36470 View commit details
  2. feat: set play rate in mooc

    - move some stylesheet into `netease.less` from `evaluator.less`
    - add `player` in `netease`
    unbyte committed May 21, 2020
    Copy the full SHA
    22b7034 View commit details
  3. style: format code

    unbyte committed May 21, 2020
    Copy the full SHA
    4999e75 View commit details

Commits on May 22, 2020

  1. Copy the full SHA
    0399e27 View commit details

Commits on May 23, 2020

  1. fix: console box overflow

    unbyte committed May 23, 2020
    Copy the full SHA
    9fdf4ca View commit details
  2. feat: add marker for mooc

    - add `feature` page in `options`
    - add `marker`
    unbyte committed May 23, 2020
    Copy the full SHA
    d4f49da View commit details
  3. chore(release): 2.2.0

    unbyte committed May 23, 2020
    Copy the full SHA
    d8d0c05 View commit details
  4. docs(readme): update usage

    unbyte committed May 23, 2020
    Copy the full SHA
    38a0016 View commit details

Commits on May 26, 2020

  1. Copy the full SHA
    1bc8fcb View commit details
  2. chore(release): 2.2.1

    unbyte committed May 26, 2020
    Copy the full SHA
    66b9972 View commit details
  3. chore: previous fix works

    66b9972
    
    close #6, #8
    unbyte committed May 26, 2020
    Copy the full SHA
    b0f329d View commit details
Showing with 4,547 additions and 941 deletions.
  1. +6 −1 .babelrc
  2. +1 −1 .eslintignore
  3. +1 −0 .github/workflows/release.yml
  4. +46 −0 CHANGELOG.md
  5. +1 −1 LICENCE → LICENSE
  6. +123 −8 README.md
  7. +47 −3 changelog.ts
  8. +26 −0 features.ts
  9. +2,533 −581 package-lock.json
  10. +39 −33 package.json
  11. +6 −4 src/background/index.ts
  12. +52 −0 src/components/NumberInput.tsx
  13. +51 −0 src/content/netease/App.tsx
  14. +76 −0 src/content/netease/api/action.ts
  15. +100 −0 src/content/netease/api/info.ts
  16. +4 −8 src/content/netease/components/console/Console.tsx
  17. +1 −0 src/content/netease/components/console/console.less
  18. +3 −53 src/content/netease/components/evaluator/Evaluator.tsx
  19. +3 −64 src/content/netease/components/evaluator/evaluator.less
  20. +6 −8 src/content/netease/components/evaluator/worker.ts
  21. +124 −0 src/content/netease/components/marker/marker.less
  22. +207 −0 src/content/netease/components/marker/marker.tsx
  23. +133 −0 src/content/netease/components/marker/worker.ts
  24. +62 −0 src/content/netease/components/player/Player.tsx
  25. +49 −0 src/content/netease/components/player/player.less
  26. +35 −0 src/content/netease/components/player/worker.ts
  27. +83 −0 src/content/netease/handler/getter.ts
  28. +104 −0 src/content/netease/handler/parse.ts
  29. +20 −32 src/content/netease/index.tsx
  30. +59 −1 src/content/netease/netease.less
  31. +57 −0 src/content/ulearning/components/answer/Answer.tsx
  32. +12 −0 src/content/ulearning/components/answer/answer.less
  33. +33 −0 src/content/ulearning/components/lecture/Lecture.tsx
  34. +40 −0 src/content/ulearning/components/lecture/lecture.less
  35. +23 −0 src/content/ulearning/index.tsx
  36. +45 −0 src/content/ulearning/ulearning.less
  37. +0 −60 src/manifest.js
  38. +60 −0 src/manifest.json
  39. +8 −4 src/options/Options.tsx
  40. +4 −4 src/options/index.tsx
  41. +4 −16 src/options/pages/about/About.tsx
  42. +2 −4 src/options/pages/changelog/Changelog.tsx
  43. +6 −6 src/options/pages/comments/Comments.tsx
  44. +8 −5 src/options/pages/comments/Component.tsx
  45. +1 −3 src/options/pages/comments/comments.less
  46. +59 −0 src/options/pages/features/features.less
  47. +88 −0 src/options/pages/features/features.tsx
  48. +7 −1 src/options/router.ts
  49. +6 −0 src/utils/hack.ts
  50. +32 −0 src/utils/request.ts
  51. +2 −4 src/utils/runtime.ts
  52. +3 −0 src/utils/sleep.ts
  53. +10 −14 src/utils/storage.ts
  54. +3 −8 tsconfig.json
  55. +33 −14 webpack.config.js
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -3,16 +3,21 @@
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"modules": false,
"targets": {
"chrome": "49",
"firefox": "52",
"opera": "36",
"edge": "79"
}
}
]
],
"@babel/typescript",
"@babel/react"
],
"plugins": [
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-transform-destructuring", { "useBuiltIns": true }],
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
[
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.idea/
.awcache/
node_modules/
dist/
extension/
*.js
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: |
extension/chrome.crx
extension/chrome.zip
extension/firefox.xpi
extension/opera.crx
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,52 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.2.1](https://github.com/unbyte/mooc-assistant/compare/v2.2.0...v2.2.1) (2020-05-26)


### Bug Fixes

* anti `anti scripts` mechanism ([1bc8fcb](https://github.com/unbyte/mooc-assistant/commit/1bc8fcb6fc70ba360406263b8a6fbc304ad17a1e))

## [2.2.0](https://github.com/unbyte/mooc-assistant/compare/v2.1.1...v2.2.0) (2020-05-23)


### Features

* add `marker` for `mooc` ([d4f49da](https://github.com/unbyte/mooc-assistant/commit/d4f49da4520cfac09d53641bfcb480b5ce9086ec))
* set play rate in `mooc` ([22b7034](https://github.com/unbyte/mooc-assistant/commit/22b70344cf67608aac7db4f83dff3f1648b73895))


### Bug Fixes

* console box overflow ([9fdf4ca](https://github.com/unbyte/mooc-assistant/commit/9fdf4ca5cfcd644e523c539e4923a64ee44df519))

### [2.1.1](https://github.com/unbyte/mooc-assistant/compare/v2.1.0...v2.1.1) (2020-05-20)


### Bug Fixes

* misplacement of buttons and inputs ([9f4cca5](https://github.com/unbyte/mooc-assistant/commit/9f4cca57df7c802e62c1658351b1eeb73f5333bc))

## [2.1.0](https://github.com/unbyte/mooc-assistant/compare/v2.0.1...v2.1.0) (2020-02-25)


### Features

* add support for `ulearning` ([04ca2ba](https://github.com/unbyte/mooc-assistant/commit/04ca2ba34eb7142fd780fb78e8a5d8af213c19d3))


### Bug Fixes

* **evaluator.less:** fix dislocation of inputs in Firefox ([7410669](https://github.com/unbyte/mooc-assistant/commit/741066925ee46311a98958644319b62e6c40a5e9))

### [2.0.1](https://github.com/unbyte/mooc-assistant/compare/v2.0.0...v2.0.1) (2020-02-20)


### Bug Fixes

* **storage.ts:** change the way to load data ([2773e5b](https://github.com/unbyte/mooc-assistant/commit/2773e5ba15d587c45e99c4bbec8e55e437013add)), closes [#1](https://github.com/unbyte/mooc-assistant/issues/1)

## 2.0.0 (2020-02-19)


2 changes: 1 addition & 1 deletion LICENCE → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Content (c) Helios <i@shangyes.net>
Copyright (c) 2020 Helios <i@shangyes.net>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
131 changes: 123 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,13 +2,18 @@
<p align="center"> <img alt="Release" src="https://img.shields.io/github/v/release/unbyte/mooc-assistant?style=flat-square"/> </p>
<p align="center"> <img alt="Stars" src="https://img.shields.io/chrome-web-store/stars/oebggekgendmoeedkkdkdcdbmfbfeldc?style=flat-square"/> <img alt="Users" src="https://img.shields.io/chrome-web-store/users/oebggekgendmoeedkkdkdcdbmfbfeldc?style=flat-square"/> <img alt="Stars" src="https://img.shields.io/amo/stars/mooc-assistant?style=flat-square"/> <img alt="Users" src="https://img.shields.io/amo/users/mooc-assistant?style=flat-square"/></p>


# 目录

- [简介](#简介)
- [下载](#下载)
- [自动互评](#自动互评)
- [设置备选随机评语](#设置备选随机评语)
- [中国大学MOOC](#中国大学MOOC)
- [自动互评](#自动互评)
- [设置备选随机评语](#设置备选随机评语)
- [倍速播放](#中国大学mooc-倍速播放)
- [秒刷进度](#秒刷进度)
- [优学堂](#优学堂)
- [习题答案](#习题答案)
- [倍速播放](#优学堂-倍速播放)
- [更新日志](#更新日志)
- [开源协议](#开源协议)

@@ -33,13 +38,17 @@ Chrome, Firefox, Opera 以及其他国产Chromium套壳浏览器均可使用。

- [Chrome商店](https://chrome.google.com/webstore/detail/moocassistant/oebggekgendmoeedkkdkdcdbmfbfeldc)
- [Firefox商店](https://addons.mozilla.org/zh-CN/firefox/addon/mooc-assistant/)
- [Opera商店](https://addons.opera.com/zh-cn/extensions/details/mooc-assistant/)

若官方商店有访问困难,可以前往本仓库[Release页面](https://github.com/unbyte/mooc-assistant/releases)下载并手动安装

<br/>

# 自动互评
# 中国大学MOOC

## 自动互评

<details>
<summary>查看详细说明</summary>

安装本插件并启用后,访问[中国大学mooc](https://www.icourse163.org/)时,页面右侧边会悬浮`慕课助手`

@@ -55,9 +64,14 @@ Chrome, Firefox, Opera 以及其他国产Chromium套壳浏览器均可使用。

> 自动互评必须在进入互评打分页面后才可开始
</details>

<br/>

## 设置备选随机评语
### 设置备选随机评语

<details>
<summary>查看详细说明</summary>

若开启随机评语,则在互评时随机使用预先设置好的评语。

@@ -71,13 +85,114 @@ Chrome, Firefox, Opera 以及其他国产Chromium套壳浏览器均可使用。

<p align="center"><img alt="配置页面示意图" src="https://i.loli.net/2020/02/19/ZXmTRDG91A4rFkt.png"/></p>

</details>

<br/>

<h2 id="中国大学mooc-倍速播放">倍速播放</h2>

<details>
<summary>查看详细说明</summary>

`倍速播放面板``互评面板`下方,只支持整数倍速

- 点击`设置`即可使倍速生效,生效后除非刷新页面,同一课程内的不同视频切换时均可自动切换倍速。

- 点击`重置`将视频速度重置回1倍速。

<p align="center"><img alt="配置页面示意图" src="https://i.loli.net/2020/05/23/lsKPNdfkMvV8OxJ.png"/></p>


</details>

<br/>

## 秒刷进度

<details>
<summary>查看详细说明</summary>

**本功能存在不确定性,包括但不限于后台显示的数据异常等。**

**【醒目】 使用本功能即意味着您已知晓本功能存在一定风险,一切后果与作者无关。**

因为本功能存在一定风险,默认是关闭状态,需要先前往插件的`配置页面`开启。

> 可通过`互评面板`上的`打开配置页面`进入
<p align="center"><img alt="配置页面示意图" src="https://i.loli.net/2020/05/23/DA9YKsLTlr4yEp8.png"/></p>

开启后重新进入慕课平台,在`播放加速面板`下出现`秒刷进度面板`

<p align="center"><img alt="秒刷进度面板示意图" src="https://i.loli.net/2020/05/23/eu4BhSzo2fDRsEK.png"/></p>

进入需要刷进度的课程页面,先点击`初始化`拉取课程的信息,再点击`选择`打开`章节选择面板`,选择需要刷进度的章节。

> 因为显示空间不够大,选择的粒度太细的话显示不过来,所以以章节为单位
选择完成后点击`章节选择面板`上方的`保存并返回`按钮回到主界面,点击`开始任务`开始刷进度。

会自动完成**视频 / 电子课件 / 文本 / 讨论**的进度。

<p align="center"><img alt="输出示意图" src="https://i.loli.net/2020/05/23/zwDQfOrnZALqpl2.png"/></p>

等到`输出框`中提示**任务结束**后,刷新页面查看结果。

</details>

<br/>

# 优学堂

## 习题答案

<details>
<summary>查看详细说明</summary>

安装本插件并启用后,访问 优学堂学习界面 `https://ua.ulearning.cn/learnCourse/***` 时,页面顶部`咨询客服`旁会出现`习题答案`菜单。

<p align="center"><img src="https://i.loli.net/2020/02/25/ADOrWThdzwEFi18.png"/></p>

点击`获取答案`,会将答案显示在习题右方:

<p align="center"><img src="https://i.loli.net/2020/02/25/fFwZoEBx73t6enh.png"/></p>

</details>

<br/>

<h2 id="优学堂-倍速播放">倍速播放</h2>

<details>
<summary>查看详细说明</summary>

安装本插件并启用后,访问 优学堂学习界面 `https://ua.ulearning.cn/learnCourse/***` 时,页面顶部`咨询客服`旁会出现`视频播放`菜单。

<p align="center"><img src="https://i.loli.net/2020/02/25/j257J6B4S1VdQbp.png"/></p>

在视频播放的页面,先输入倍速,再点击倍速播放即可开始播放

> 受浏览器限制,最大为16倍速,且超过一定倍速会浏览器会自动静音视频
</details>

<br/>

# 更新日志

详细开发更新日志请参阅: [CHANGELOG.md](https://github.com/unbyte/mooc-assistant/blob/master/CHANGELOG.md)

<br/>

- v2.2.0
- 支持 中国大学MOOC 视频倍速播放
- 支持 中国大学MOOC 秒刷学习进度
- v2.1.0
- 支持 优学堂 获取习题答案
- 支持 优学堂 倍速播放
- v2.0.0
- 支持自动互评
- 支持随机评语
- 支持 中国大学MOOC 自动互评
- 支持 中国大学MOOC 随机评语

<br/>

50 changes: 47 additions & 3 deletions changelog.ts
Original file line number Diff line number Diff line change
@@ -15,16 +15,60 @@ interface ChangelogFormat {

export default <ChangelogFormat[]>[
{
version: "2.0.0",
version:"2.2.1",
details:[
{
tag: Tag.FIX_OPT,
text: "修复 中国大学MOOC 互评被Ban"
}
]
},
{
version: "2.2.0",
details: [
{
tag: Tag.ADD_FEAT,
text: "支持自动互评"
text: "支持 中国大学MOOC 视频倍速播放"
},
{
tag: Tag.ADD_FEAT,
text: "支持随机评语"
text: "支持 中国大学MOOC 秒刷学习进度"
}
]
},
{
version: "2.1.1",
details: [
{
tag: Tag.FIX_OPT,
text: "修复 中国大学MOOC 表单与按钮错位"
}
]
},
{
version: "2.1.0",
details: [
{
tag: Tag.ADD_FEAT,
text: "支持 优学堂 获取练习答案"
},
{
tag: Tag.ADD_FEAT,
text: "支持 优学堂 倍速播放"
}
]
},
{
version: "2.0.0",
details: [
{
tag: Tag.ADD_FEAT,
text: "支持 中国大学MOOC 自动互评"
},
{
tag: Tag.ADD_FEAT,
text: "支持 中国大学MOOC 随机评语"
}
]
}
];
26 changes: 26 additions & 0 deletions features.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface FeatureItem {
name: string;
platform: Platform;
description: string;
}

export type FeatureList = { [name: string]: FeatureItem };

export type FeatureStatusList = { [name: string]: boolean };

export enum Platform {
MOOC = "网易 MOOC",
ULEARNING = "优学堂"
}

export const availableFeatures: FeatureList = {
MOOC_MARK_LEARNT: {
name: "秒刷学习进度",
platform: Platform.MOOC,
description: "直接修改课件学习状态为已学习,同时简单伪造学习时间"
}
};

export enum FeatureKeys {
MOOC_MARK_LEARNT = "MOOC_MARK_LEARNT"
}
Loading