Skip to content

Commit

Permalink
[refactor] manifest v2 --> manifest v3 (#274)
Browse files Browse the repository at this point in the history
* [refactor] replace all files with mv3 boilerplate

* [refactor] Popup is ready

* [refactor] Options is ready

* [refactor] Background is ready

* [refactor] ContentScripts is ready

* [refactor] add .prettierignore

* [refactor] fix wrong path of css file

* [refactor] remove Devtools and Newtab pages since they are not used in this extension

* [refactor] fix "Icons registered" error

* [refactor] fix deprecated api 'onchanged' to 'onchange'

* [refactor] Buffer is not polyfilled in webpack5, so resolve it

* [refactor] modify crx-webpack-plugin to make it compatible with webpack5 hooks API

* [refactor] other files are ready

[refactor] prettify files (yarn run prettier)

* [doc] update README and CONTRIBUTING

* [refactor] remove eslint becuase never use it, will add it back when needed

* [doc] updated README

* bump hypercrx from 1.3.0 to 1.4.0
  • Loading branch information
tyn1998 authored Mar 1, 2022
1 parent b6dc905 commit 4fec847
Show file tree
Hide file tree
Showing 96 changed files with 13,154 additions and 19,743 deletions.
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"presets": [
"react-app"
// "@babel/preset-env"
"@babel/preset-react"
// "react-app"
],
"plugins": [
// "@babel/plugin-proposal-class-properties",
"react-hot-loader/babel"
]
}
}
9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

41 changes: 35 additions & 6 deletions .github/hypertrons.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@
"name": "kind/CICD",
"description": "CI/CD related issue or pull",
"color": "0099ff",
"keywords": ["continuous integration", "continuous delivery", "[ci]", "[cd]", "[ci/cd]"]
"keywords": [
"continuous integration",
"continuous delivery",
"[ci]",
"[cd]",
"[ci/cd]"
]
}
]
},
Expand All @@ -59,19 +65,42 @@
{
"name": "committer",
"description": "Committer of the project",
"users": ["frank-zsy", "heming6666", "LiuChangFreeman", "tyn1998", "zhuxiangning"],
"commands": ["/difficulty", "/rerun", "/complete-checklist", "/start-vote"]
"users": [
"frank-zsy",
"heming6666",
"LiuChangFreeman",
"tyn1998",
"zhuxiangning"
],
"commands": [
"/difficulty",
"/rerun",
"/complete-checklist",
"/start-vote"
]
},
{
"name": "replier",
"description": "Replier is responsible for reply issues in time",
"users": ["heming6666", "LiuChangFreeman", "xiaoya-Esther", "tyn1998", "zhuxiangning"],
"users": [
"heming6666",
"LiuChangFreeman",
"xiaoya-Esther",
"tyn1998",
"zhuxiangning"
],
"commands": []
},
{
"name": "approver",
"description": "After approvers' approve, pulls should be merged automatically",
"users": ["frank-zsy", "heming6666", "LiuChangFreeman", "tyn1998", "zhuxiangning"],
"users": [
"frank-zsy",
"heming6666",
"LiuChangFreeman",
"tyn1998",
"zhuxiangning"
],
"commands": ["/approve"]
},
{
Expand Down Expand Up @@ -131,4 +160,4 @@
"vote": {
"version": 1
}
}
}
15 changes: 7 additions & 8 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
>### delete this section
> ### delete this section
>Before you submit an issue, consider the following guidelines:
> Before you submit an issue, consider the following guidelines:
>- Please search for related issues. Make sure you are not going to open a duplicate issue.
>- Please specify what kind of issue it is and explain it in the title or content, e.g. `feature`, `bug`, `documentation`, `discussion`, `help wanted`... The issue will be tagged automatically by the robot of the project(Menbotics)
> - Please search for related issues. Make sure you are not going to open a duplicate issue.
> - Please specify what kind of issue it is and explain it in the title or content, e.g. `feature`, `bug`, `documentation`, `discussion`, `help wanted`... The issue will be tagged automatically by the robot of the project(Menbotics)
## Type of Issue

_What types of issue have you found with hypertrons-crx?_
_Put an `x` in the boxes that apply_

Expand All @@ -17,7 +18,6 @@ _Put an `x` in the boxes that apply_
- [ ] Test Improvement
- [ ] Raise a Question


## Introduction to the issue

[provide a general introduction to the issue you are logging and why it is relevant to this repository]
Expand All @@ -42,10 +42,9 @@ _Put an `x` in the boxes that apply_

[not obligatory, but suggest fixes or reasons for the bug]

* Modal tells the user what dataset is being deleted, like “You are about to delete this dataset: car_crashes_2014.”
* A temporary "Trashcan" where you can recover a just deleted dataset if you mess up (maybe it's only good for a few hours, and then it cleans the cache assuming you made the right decision).
- Modal tells the user what dataset is being deleted, like “You are about to delete this dataset: car_crashes_2014.”
- A temporary "Trashcan" where you can recover a just deleted dataset if you mess up (maybe it's only good for a few hours, and then it cleans the cache assuming you made the right decision).

## screenshot

[if relevant, include a screenshot]

11 changes: 8 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## Purpose

_Describe the problem or feature in addition to a link to the issues._

## Proposed changes

_Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue._

#### Open Questions and Pre-Merge TODOs

- [ ] Use github checklists. When solved, check the box and explain the answer.

#### Types of changes

_What types of changes does your code introduce to hypertrons-crx?_
_Put an `x` in the boxes that apply_

Expand All @@ -16,12 +20,12 @@ _Put an `x` in the boxes that apply_
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)


## Approach
_How does this change address the problem?_

_How does this change address the problem?_

## Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I have read the [CONTRIBUTING](https://github.com/hypertrons/hypertrons-crx/blob/master/CONTRIBUTING.md) doc
Expand All @@ -31,5 +35,6 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
- [ ] I have added necessary documentation (if appropriate)

## Further comments (Optional)

_If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc..._
_Links to blog posts, patterns, libraries or addons used to solve this problem_
_Links to blog posts, patterns, libraries or addons used to solve this problem_
61 changes: 24 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# release
/release

# jetbrains
/.idea

# vscode
/.vscode

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# yarn lock file
yarn.lock

# secrets
secrets.*.js

# logs
yarn-error.log

/utils/web-ext-profile/
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build
/release

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.history
.vscode
package-lock.json

# secrets
secrets.*.js
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We

### 5. Make your changes

Now you can create your patch, including appropriate test cases in the new branch. Please read and follow our [Code Rules](#rules).
Now you can code. Please read and follow our [Code Rules](#rules).

After you finish your modification, run the test and ensure that all tests pass.
After you finish your modification, please prettify the code.

```shell
npm run test
yarn run prettier
```

### 6. Commit your changes
Expand Down Expand Up @@ -184,4 +184,4 @@ Please sign our [Contributor License Agreement (CLA)][cla] before sending pull r
[angular-commit-message-format]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines
[pr-template]: ./.github/pull_request_template.md
[issue-template]: ./.github/issue_template.md
[cla]: https://cla-assistant.io/hypertrons/hypertrons-crx
[cla]: https://cla-assistant.io/hypertrons/hypertrons-crx
22 changes: 9 additions & 13 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We welcome users to install and try our Hypertrons Chrome Extension. If you have

<img src="assets/en/installation-edge-1.png">

2. Then you can find the dashboards in:
2. Then you can find the dashboards in:

<table>
<tr>
Expand Down Expand Up @@ -70,7 +70,7 @@ The latest release can be found on this page https://github.com/hypertrons/hyper

2. Open Edge and enter [edge://extensions/](edge://extensions/) in the address bar directing to the extension management page.

3. Turn on the **[Developer Mode]** button on the bottom left corner of this page, then refresh.
3. Turn on the **[Developer Mode]** button on the bottom left corner of this page, then refresh.

4. Click **[Load Unpacked]** button on the top right, and select the folder (`/build`) under the folder ( `hypertrons/`) unzipped in step 1.

Expand All @@ -91,6 +91,7 @@ The latest release can be found on this page https://github.com/hypertrons/hyper
6. Now, the extension can be successfully loaded. Make sure the switch is on.

## <a id="360-speed"> 360 Speed Explorer

1. Download file `hypertrons.crx`.

2. Open the browser and enter [chrome://myextensions/extensions](chrome://myextensions/extensions) in the address bar directing to the extension management page.
Expand All @@ -103,29 +104,24 @@ The latest release can be found on this page https://github.com/hypertrons/hyper

6. Now, the extension can be successfully loaded. Make sure the switch is on.



# Additional Configuration

### Adding Github Token
### Adding Github Token

Hypertrons requires a github token for getting the avatar and username from Github repositories and getting the hypertrons.json.
Hypertrons requires a github token for getting the avatar and username from Github repositories and getting the hypertrons.json.

1. Click on the hypertrons icon to open the menu and select set Token

<img src="assets/en/ex.png">

<img src="assets/en/ex.png">

2. Now click on set Token in the Options page

<img src="assets/en/op.png">

<img src="assets/en/op.png">

3. You'll need a github token with "public_repo" scope. <a href="https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token">How to generate token?</a>

<img src="assets/en/mo.png">

<img src="assets/en/mo.png">

4. Paste the token and click ok

<img src="assets/en/set.png">
<img src="assets/en/set.png">
15 changes: 7 additions & 8 deletions INSTALLATION.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Hypertrons-crx 现已登陆 [Chrome 网上应用商店](https://chrome.google.co
- [360 安全浏览器](#360-safety)

- [360 快速浏览器](#360-speed)

### <a id="chrome"></a> Chrome 浏览器

1. 下载 `hypertrons.zip`, 解压。
Expand Down Expand Up @@ -115,17 +115,16 @@ Hypertrons-crx 现已登陆 [Chrome 网上应用商店](https://chrome.google.co
Hypertrons 需要一个 GitHub token 来从 GitHub 仓库中获取用户信息,以得到 hypertrons.json 文件。

1. 右键 hypertrons 图标,进入“选项”,打开设置菜单,并选择“设置 token”;

<img src="assets/zh-CN/token-1.png">

2. 在弹出的页面中粘贴您已经生成的 token,<a href="https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token">如何生成token?</a>
<img src="assets/zh-CN/token-1.png">

2. 在弹出的页面中粘贴您已经生成的 token,<a href="https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token">如何生成 token?</a>

<img src="assets/zh-CN/token-2.png">
<img src="assets/zh-CN/token-2.png">

3. 粘贴您的 token 后,点击“确定”,您的 token 将会被应用。
<img src="assets/zh-CN/token-3.png">
<img src="assets/zh-CN/token-3.png">

以上是 Hypertrons-crx 的安装及使用说明,若您在安装和使用过程中有任何问题和建议,可访问项目的 issue列表 (https://github.com/hypertrons/hypertrons-crx/issues) 或创建 isuue 与我们进行讨论。
以上是 Hypertrons-crx 的安装及使用说明,若您在安装和使用过程中有任何问题和建议,可访问项目的 issue 列表 (https://github.com/hypertrons/hypertrons-crx/issues) 或创建 isuue 与我们进行讨论。

感谢您的支持!

Loading

0 comments on commit 4fec847

Please sign in to comment.