This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
7,920 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
|
||
npm-debug.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,53 @@ | ||
# course-robot | ||
# Course Robot使用说明 | ||
|
||
Course Robot中文译为课程机器人,顾名思义,即是用于辅助个人学习网上课程的工具。关于创作初衷:看到同事们都有在中国电信网上大学参加各种专题学习的任务,并且定期会统计学习完成情况,但是很多同事平时工作比较繁杂,经常由于开会、外出等事情导致人不在工位,耽搁学习进度。所以开发了这样一个浏览器扩展程序,用于帮助有需要的同事自动化完成学习。 | ||
|
||
## 使用需知 | ||
|
||
本程序是帮助电信内部员工完成网上课程的,如果你决定使用,需遵守以下规定: | ||
|
||
- 不要随意宣扬和传播这个软件 | ||
|
||
- 只供电信内部使用,不要外传 | ||
|
||
## 兼容性 | ||
|
||
本插件兼容webkit内核的浏览器,目前支持谷歌Chrome浏览器和Edge浏览器,其它浏览器由于内核版本原因不支持,安装该扩展程序时,最好更新浏览器到最新版本。 | ||
|
||
## 安装说明 | ||
|
||
以Chrome浏览器为例安装Course Robot扩展程序,其它浏览器大同小异。 | ||
|
||
1. 设置浏览器,按照图中的步骤依次选择,添加https://kc.zhixueyun.com, 允许弹窗和重定向 | ||
|
||
![](./public/images/options/2022-08-28-12-23-50-1661660626221.jpg)![](./public/images/options/2022-08-28-12-26-08-1661660762546.jpg)![](./public/images/options/2022-08-28-12-28-48-1661660895453.jpg)![](./public/images/options/2022-08-28-12-31-04-1661661057301.jpg) | ||
|
||
2. 安装扩展程序,首先将course-robot.zip解压缩,然后打开浏览器扩展程序管理界面,开启开发者模式,加载已解压的扩展程序,选择刚刚解压缩的扩展程序文件夹。 | ||
|
||
![](./public/images/options/2022-08-28-16-12-53-1661674365048.jpg)![](./public/images/options/2022-08-28-16-17-27-1661674639981.jpg)![](./public/images/options/2022-08-28-16-20-04-1661674788304.jpg)![](./public/images/options/2022-08-28-16-21-51-1661674907614.jpg) | ||
|
||
3. 将程序固定到浏览器工具栏 | ||
|
||
<img src="./public/images/options/2022-08-28-16-25-09-1661675105797.jpg" title="" alt="" width="624"><img src="./public/images/options/2022-08-28-16-26-40-1661675195196.jpg" title="" alt="" width="621"> | ||
|
||
## 如何使用 | ||
|
||
1. 登录中国电信网上大学-知识中心 | ||
|
||
![](./public/images/options/2022-08-28-16-31-03-1661675456028.jpg) | ||
|
||
2. 选择要学习的专题,复制专题链接 | ||
|
||
![](./public/images/options/2022-08-28-16-34-11-1661675605436.jpg) | ||
|
||
3. 点击应用程序图标,填入复制的专题链接,开始学习 | ||
|
||
<img src="./public/images/options/2022-08-28-16-38-46-1661675920338.jpg" title="" alt="" width="623"> | ||
|
||
## 注意事项 | ||
|
||
- 在开始学习之前一定要先登录中国电信网上大学,并且进入知识中心,否则机器人不能工作 | ||
|
||
- 如果遇到问题,先点击结束工作按钮,然后再次点击开始工作 | ||
|
||
- 如果遇到不能解决的问题,请将问题反馈至邮箱:snchengqi@163.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
|
||
const PATHS = { | ||
src: path.resolve(__dirname, '../src'), | ||
build: path.resolve(__dirname, '../build'), | ||
}; | ||
|
||
module.exports = PATHS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
'use strict'; | ||
|
||
const SizePlugin = require('size-plugin'); | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
|
||
const PATHS = require('./paths'); | ||
|
||
// To re-use webpack configuration across templates, | ||
// CLI maintains a common webpack configuration file - `webpack.common.js`. | ||
// Whenever user creates an extension, CLI adds `webpack.common.js` file | ||
// in template's `config` folder | ||
const common = { | ||
output: { | ||
// the build folder to output bundles and assets in. | ||
path: PATHS.build, | ||
// the filename template for entry chunks | ||
filename: '[name].js', | ||
}, | ||
devtool: 'source-map', | ||
stats: { | ||
all: false, | ||
errors: true, | ||
builtAt: true, | ||
}, | ||
module: { | ||
rules: [ | ||
// Help webpack in understanding CSS files imported in .js files | ||
{ | ||
test: /\.css$/, | ||
use: [MiniCssExtractPlugin.loader, 'css-loader'], | ||
}, | ||
// Check for images imported in .js files and | ||
{ | ||
test: /\.(png|jpe?g|gif)$/i, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
outputPath: 'images', | ||
name: '[name].[ext]', | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
// Print file sizes | ||
new SizePlugin(), | ||
// Copy static assets from `public` folder to `build` folder | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ | ||
from: '**/*', | ||
context: 'public', | ||
}, | ||
] | ||
}), | ||
// Extract CSS into separate files | ||
new MiniCssExtractPlugin({ | ||
filename: '[name].css', | ||
}), | ||
], | ||
}; | ||
|
||
module.exports = common; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
const { merge } = require('webpack-merge'); | ||
|
||
const common = require('./webpack.common.js'); | ||
const PATHS = require('./paths'); | ||
|
||
// Merge webpack configuration files | ||
const config = merge(common, { | ||
entry: { | ||
popup: PATHS.src + '/popup.js', | ||
contentScriptSpecial: PATHS.src + '/contentScriptSpecial.js', | ||
contentScriptCourse: PATHS.src + '/contentScriptCourse.js', | ||
background: PATHS.src + '/background.js', | ||
}, | ||
}); | ||
|
||
module.exports = config; |
Oops, something went wrong.