Skip to content

Commit

Permalink
feat: rename to iAutomator
Browse files Browse the repository at this point in the history
  • Loading branch information
solobat committed Oct 17, 2023
1 parent e8561de commit 004de92
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 67 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">iHelpers</h1>
<p align="left">iHelpers is a Chrome extension that provides users with built-in shortcuts such as reading mode, night mode, page outlines, and basic operations like clicking, inputting, event listening and emitting, and more. In addition to supporting custom functions through script mode, iHelpers also allows for instruction configuration through its user interface. Whether you are looking to increase productivity or seeking more convenience while browsing the web, iHelpers is a very practical tool.</p>
<h1 align="center">iAutomator</h1>
<p align="left">iAutomator is a Chrome extension that provides users with built-in shortcuts such as reading mode, night mode, page outlines, and basic operations like clicking, inputting, event listening and emitting, and more. In addition to supporting custom functions through script mode, iAutomator also allows for instruction configuration through its user interface. Whether you are looking to increase productivity or seeking more convenience while browsing the web, iAutomator is a very practical tool.</p>
<p align="center">
<a href="https://github.com/solobat/iHelpers/releases"><img src="https://img.shields.io/badge/lastest_version-2.5.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
<a href="https://github.com/solobat/iAutomator/releases"><img src="https://img.shields.io/badge/lastest_version-2.5.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
</p>

---
Expand All @@ -11,17 +11,17 @@

## Install

- [Chrome Web Store](https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick)
- [Chrome Web Store](https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick)

## Docs

- [IScript Documents](./docs/IScript_en.md) / [中文](./docs/IScript.md)
- [Types Documents](https://types.ihelpers.xyz/)
- [Types Documents](https://types.iautomator.xyz/)
- [Youtube Video](https://www.youtube.com/watch?v=L7DpcRtkq2U)

## Features

### Table of Built-in Actions in iHelpers
### Table of Built-in Actions in iAutomator

#### Reload

Expand Down Expand Up @@ -305,7 +305,7 @@ yarn build
<!-- Link -->

[version-badge]: https://img.shields.io/badge/lastest_version-1.6.0-blue.svg
[version-link]: https://github.com/solobat/iHelpers
[version-link]: https://github.com/solobat/iAutomator
[chrome-badge]: https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg
[offline-badge]: https://img.shields.io/badge/download-_crx-brightgreen.svg
[license-badge]: https://img.shields.io/github/license/mashape/apistatus.svg
Expand Down
4 changes: 2 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ rm -fr dist/
echo "Compiling....."
yarn turbo build || { echo "Compilation failed, please check and try again"; exit 1; }

zip -r ihelpers.zip dist/
zip -r iautomator.zip dist/

echo "Packaged done"

mv -f ihelpers.zip ~/Downloads/
mv -f iautomator.zip ~/Downloads/

echo "Move to Download"
38 changes: 19 additions & 19 deletions docs/.vitepress/cache/deps/@theme_index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
title: 'iHelpers Document',
title: 'iAutomator Document',
description: 'A Chrome automation extension',
type: "module"
}
2 changes: 1 addition & 1 deletion docs/IScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end
- 执行语句
- 格式为: `apply "{actionName}" with (var1=1, var2=othervar, var=false, ...) on "CssSelector"`
- `apply` 语句可以执行所有内置的 `action`;本质上讲,快捷语句也都可以由 `apply` 语句改写。
- `action` 可以查看 [Action 文档](https://types.ihelpers.xyz/modules.html)
- `action` 可以查看 [Action 文档](https://types.iautomator.xyz/modules.html)


## 例子
Expand Down
2 changes: 1 addition & 1 deletion docs/IScript_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Statements are written inside an `automation` block and can be divided into the
- Execution statements
- The format is: `apply "{actionName}" with (var1=1, var2=othervar, var=false, ...) on "CssSelector"`
- The `apply` statement can execute all built-in `action`s, and essentially, shortcut statements can be rewritten by `apply` statements.
- `action` can be viewed in the [Action documentation](https://types.ihelpers.xyz/modules.html).
- `action` can be viewed in the [Action documentation](https://types.iautomator.xyz/modules.html).

## Example
- Weibo Read-Mode
Expand Down
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">iHelpers</h1>
<p align="left">iHelpers is a Chrome extension that provides users with built-in shortcuts such as reading mode, night mode, page outlines, and basic operations like clicking, inputting, event listening and emitting, and more. In addition to supporting custom functions through script mode, iHelpers also allows for instruction configuration through its user interface. Whether you are looking to increase productivity or seeking more convenience while browsing the web, iHelpers is a very practical tool.</p>
<h1 align="center">iAutomator</h1>
<p align="left">iAutomator is a Chrome extension that provides users with built-in shortcuts such as reading mode, night mode, page outlines, and basic operations like clicking, inputting, event listening and emitting, and more. In addition to supporting custom functions through script mode, iAutomator also allows for instruction configuration through its user interface. Whether you are looking to increase productivity or seeking more convenience while browsing the web, iAutomator is a very practical tool.</p>
<p align="center">
<a href="https://github.com/solobat/iHelpers/releases"><img src="https://img.shields.io/badge/lastest_version-2.5.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
<a href="https://github.com/solobat/iAutomator/releases"><img src="https://img.shields.io/badge/lastest_version-2.5.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
</p>

---
Expand All @@ -11,17 +11,17 @@

## Install

- [Chrome Web Store](https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick)
- [Chrome Web Store](https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick)

## Docs

- [IScript Documents](./IScript_en.md) / [中文](./IScript.md)
- [Types Documents](https://types.ihelpers.xyz/)
- [Types Documents](https://types.iautomator.xyz/)
- [Youtube Video](https://www.youtube.com/watch?v=L7DpcRtkq2U)

## Features

### Table of Built-in Actions in iHelpers
### Table of Built-in Actions in iAutomator

#### Reload

Expand Down Expand Up @@ -305,7 +305,7 @@ yarn build
<!-- Link -->

[version-badge]: https://img.shields.io/badge/lastest_version-1.6.0-blue.svg
[version-link]: https://github.com/solobat/iHelpers
[version-link]: https://github.com/solobat/iAutomator
[chrome-badge]: https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg
[offline-badge]: https://img.shields.io/badge/download-_crx-brightgreen.svg
[license-badge]: https://img.shields.io/github/license/mashape/apistatus.svg
Expand Down
16 changes: 8 additions & 8 deletions docs/index_cn.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<h1 align="center">iHelpers</h1>
<p align="left">iHelpers 是一个 Chrome 扩展程序,为用户提供了内置的快捷方式,例如阅读模式、夜间模式、页面概述,以及一些基本操作如点击、输入、事件监听和派发等等。除了通过 IScript 支持脚本模式的自动化之外,iHelpers 还允许通过其界面进行指令配置。无论你是想提高生产力还是在浏览 Web 时寻求更多便利,iHelpers 都是一个非常实用的工具。
<h1 align="center">iAutomator</h1>
<p align="left">iAutomator 是一个 Chrome 扩展程序,为用户提供了内置的快捷方式,例如阅读模式、夜间模式、页面概述,以及一些基本操作如点击、输入、事件监听和派发等等。除了通过 IScript 支持脚本模式的自动化之外,iAutomator 还允许通过其界面进行指令配置。无论你是想提高生产力还是在浏览 Web 时寻求更多便利,iAutomator 都是一个非常实用的工具。
</p>
<p align="center">
<a href="https://github.com/solobat/iHelpers/releases"><img src="https://img.shields.io/badge/lastest_version-1.8.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
<a href="https://github.com/solobat/iAutomator/releases"><img src="https://img.shields.io/badge/lastest_version-1.8.0-blue.svg"></a>
<a target="_blank" href="https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick"><img src="https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg"></a>
</p>

---

## 安装

- [Chrome Web Store](https://chrome.google.com/webstore/detail/ihelpers/hcnekoladldejmeindnhpjkfhjadcick)
- [Chrome Web Store](https://chrome.google.com/webstore/detail/iautomator/hcnekoladldejmeindnhpjkfhjadcick)

## 功能类型
### iHelpers 内置操作列表
### iAutomator 内置操作列表

#### Reload

Expand Down Expand Up @@ -275,7 +275,7 @@

## 文档
- [IScript 脚本文档](./IScript.md)
- [类型文档](https://types.ihelpers.xyz/)
- [类型文档](https://types.iautomator.xyz/)
- [Youtube 视频](https://www.youtube.com/watch?v=L7DpcRtkq2U)

## 开发
Expand All @@ -300,7 +300,7 @@ yarn build
<!-- Link -->

[version-badge]: https://img.shields.io/badge/lastest_version-1.6.0-blue.svg
[version-link]: https://github.com/solobat/iHelpers
[version-link]: https://github.com/solobat/iAutomator
[chrome-badge]: https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg
[offline-badge]: https://img.shields.io/badge/download-_crx-brightgreen.svg
[license-badge]: https://img.shields.io/github/license/mashape/apistatus.svg
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ihelpers",
"name": "iautomator",
"version": "2.5.0",
"description": "iHelpers: Convenience and automation of commonly used browser actions",
"description": "iAutomator: Convenience and automation of commonly used browser actions",
"scripts": {
"build": "tsc --noEmit && vite build",
"build:hmr": "rollup --config utils/reload/rollup.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion public/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extName": {
"message": "iHelpers: automation/shortcuts"
"message": "iAutomator: automation/shortcuts"
},
"extDesc": {
"message": "Browser Automation Productivity Tools"
Expand Down
2 changes: 1 addition & 1 deletion public/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extName": {
"message": "iHelpers:捷径/快捷指令/自动化"
"message": "iAutomator:捷径/快捷指令/自动化"
},
"extDesc": {
"message": "浏览器自动化效率工具"
Expand Down
4 changes: 2 additions & 2 deletions src/builtin/Note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export interface CreateNoteExecOptions extends ExecOptions {
isComment?: boolean;
}

const NID_KEY = "ihelpers_nid";
const NID_KEY_CONTENT = "ihelpers_nid_content";
const NID_KEY = "iautomator_nid";
const NID_KEY_CONTENT = "iautomator_nid_content";

export class CreateNote extends Base {
name = BUILTIN_ACTIONS.NOTE;
Expand Down
4 changes: 2 additions & 2 deletions src/helper/libs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export function initLibs() {
return getDb().then((db) => {
const libs = getLibs({
storageKey: "cuid",
extName: "ihelpers",
extName: "iautomator",
db: db as Dexie,
dbNames: ["automations", "records", "notes"],
ROOT_PATH: "/iHelpers",
ROOT_PATH: "/iAutomator",
});

return libs;
Expand Down
8 changes: 5 additions & 3 deletions src/pages/content/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,17 @@ function bindAppEvents() {
}

function isTrustDomain() {
const domains: string[] = ["localhost", "ihelpers.xyz", "www.dicts.cn"];
const domains: string[] = ["localhost", "iautomator.xyz", "ihelpers.xyz"];

return domains.indexOf(window.location.hostname) !== -1;
}

function bindWebsiteEvents() {
if (isTrustDomain()) {
document.addEventListener("ihelpers", function (event) {
handleWebEvents(event);
["ihelpers", "iautomator"].forEach((domain) => {
document.addEventListener(domain, function (event) {
handleWebEvents(event);
});
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/popup/components/Automation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function Buttons() {
<ButtonGroup style={{ marginBottom: "10px" }}>
<MenuBtn
onClick={() =>
chrome.tabs.create({ url: "https://ihelpers.xyz/automations" })
chrome.tabs.create({ url: "https://iautomator.xyz/automations" })
}
icon={
<SearchOutlined
Expand Down Expand Up @@ -163,7 +163,7 @@ function MenuBtn(props: {
}

const defaultScript = `
# example, see: https://docs.ihelpers.xyz/IScript_en.html
# example, see: https://docs.iautomator.xyz/IScript_en.html
automation for "https://weibo.com/*" on "load"
set excludes = ".Frame_wrap_16as0"
apply "readMode" with (excludes=excludes) on "#homeWrap"
Expand Down Expand Up @@ -793,7 +793,7 @@ function EditBtn(props: { record: IAutomation }) {
function getShareURL(item: Automation) {
const { instructions, runAt, pattern } = item;

return `https://ihelpers.xyz/create?instructions=${encodeURIComponent(
return `https://iautomator.xyz/create?instructions=${encodeURIComponent(
instructions
)}&runAt=${runAt}&pattern=${encodeURIComponent(pattern)}`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/popup/components/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export function Help() {
return (
<ul style={{ listStyle: "none", paddingLeft: 0 }}>
<li>
<Button href="https://ihelpers.xyz/" target="_blank" type="link">
<Button href="https://iautomator.xyz/" target="_blank" type="link">
{t("website")}
</Button>
</li>
<li>
<Button href="https://docs.ihelpers.xyz/" target="_blank" type="link">
<Button href="https://docs.iautomator.xyz/" target="_blank" type="link">
{t("documents")}
</Button>
</li>
Expand Down
6 changes: 3 additions & 3 deletions src/server/db/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const schema: Schema = {
notes: "++id,content,domain,path,nid,createTime,updateTime,deleted",
};

export class IHelpersDatabase extends Dexie {
export class IAutomatorDatabase extends Dexie {
rules: Dexie.Table<IRule, number>;
records: Dexie.Table<IRecord, number>;
automations: Dexie.Table<IAutomation, number>;
Expand Down Expand Up @@ -90,7 +90,7 @@ export interface IShortcut {
deleted?: boolean;
}

let db: IHelpersDatabase;
let db: IAutomatorDatabase;

export async function getDb() {
if (db) {
Expand All @@ -99,7 +99,7 @@ export async function getDb() {
const v = await getVersion();
show("now version: ", v);

db = new IHelpersDatabase(v);
db = new IAutomatorDatabase(v);
db.shortcuts.mapToClass(Shortcut);
db.automations.mapToClass(Automation);
db.records.mapToClass(Record);
Expand Down

0 comments on commit 004de92

Please sign in to comment.