From 004de922072facea54ff35d3318457762d78c6d1 Mon Sep 17 00:00:00 2001 From: solobat Date: Tue, 17 Oct 2023 14:44:18 +0800 Subject: [PATCH] feat: rename to iAutomator --- README.md | 16 ++++----- build/build.sh | 4 +-- docs/.vitepress/cache/deps/@theme_index.js | 38 +++++++++++----------- docs/.vitepress/config.js | 2 +- docs/IScript.md | 2 +- docs/IScript_en.md | 2 +- docs/index.md | 16 ++++----- docs/index_cn.md | 16 ++++----- package.json | 4 +-- public/_locales/en/messages.json | 2 +- public/_locales/zh_CN/messages.json | 2 +- src/builtin/Note.ts | 4 +-- src/helper/libs.ts | 4 +-- src/pages/content/app.ts | 8 +++-- src/pages/popup/components/Automation.tsx | 6 ++-- src/pages/popup/components/Help.tsx | 4 +-- src/server/db/database.ts | 6 ++-- 17 files changed, 69 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 69735a2..989c775 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -

iHelpers

-

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.

+

iAutomator

+

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.

- - + +

--- @@ -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 @@ -305,7 +305,7 @@ yarn build [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 diff --git a/build/build.sh b/build/build.sh index 8d063ee..dbb40c0 100644 --- a/build/build.sh +++ b/build/build.sh @@ -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" \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/@theme_index.js b/docs/.vitepress/cache/deps/@theme_index.js index ee9d8b4..f27601c 100644 --- a/docs/.vitepress/cache/deps/@theme_index.js +++ b/docs/.vitepress/cache/deps/@theme_index.js @@ -1,25 +1,25 @@ // node_modules/vitepress/dist/client/theme-default/index.js -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/fonts.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/fonts.css"; // node_modules/vitepress/dist/client/theme-default/without-fonts.js -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/vars.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/base.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/utils.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css"; -import "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css"; -import VPBadge from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; -import Layout from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/Layout.vue"; -import { default as default2 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue"; -import { default as default3 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue"; -import { default as default4 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue"; -import { default as default5 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue"; -import { default as default6 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue"; -import { default as default7 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue"; -import { default as default8 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue"; -import { default as default9 } from "/Users/tomasyang/github/iHelpers/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/vars.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/base.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/utils.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css"; +import "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css"; +import VPBadge from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; +import Layout from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/Layout.vue"; +import { default as default2 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue"; +import { default as default3 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue"; +import { default as default4 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue"; +import { default as default5 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue"; +import { default as default6 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue"; +import { default as default7 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue"; +import { default as default8 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue"; +import { default as default9 } from "/Users/tomasyang/github/iAutomator/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue"; var theme = { Layout, enhanceApp: ({ app }) => { diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 9fb8b41..ae91ac2 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,5 +1,5 @@ export default { - title: 'iHelpers Document', + title: 'iAutomator Document', description: 'A Chrome automation extension', type: "module" } \ No newline at end of file diff --git a/docs/IScript.md b/docs/IScript.md index 3dc9c50..59bb8f2 100644 --- a/docs/IScript.md +++ b/docs/IScript.md @@ -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) ## 例子 diff --git a/docs/IScript_en.md b/docs/IScript_en.md index 8acc3da..bf25004 100644 --- a/docs/IScript_en.md +++ b/docs/IScript_en.md @@ -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 diff --git a/docs/index.md b/docs/index.md index ff93577..ee56b87 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,8 @@ -

iHelpers

-

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.

+

iAutomator

+

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.

- - + +

--- @@ -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 @@ -305,7 +305,7 @@ yarn build [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 diff --git a/docs/index_cn.md b/docs/index_cn.md index b07efcc..23ebaa5 100644 --- a/docs/index_cn.md +++ b/docs/index_cn.md @@ -1,19 +1,19 @@ -

iHelpers

-

iHelpers 是一个 Chrome 扩展程序,为用户提供了内置的快捷方式,例如阅读模式、夜间模式、页面概述,以及一些基本操作如点击、输入、事件监听和派发等等。除了通过 IScript 支持脚本模式的自动化之外,iHelpers 还允许通过其界面进行指令配置。无论你是想提高生产力还是在浏览 Web 时寻求更多便利,iHelpers 都是一个非常实用的工具。 +

iAutomator

+

iAutomator 是一个 Chrome 扩展程序,为用户提供了内置的快捷方式,例如阅读模式、夜间模式、页面概述,以及一些基本操作如点击、输入、事件监听和派发等等。除了通过 IScript 支持脚本模式的自动化之外,iAutomator 还允许通过其界面进行指令配置。无论你是想提高生产力还是在浏览 Web 时寻求更多便利,iAutomator 都是一个非常实用的工具。

- - + +

--- ## 安装 -- [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 @@ -275,7 +275,7 @@ ## 文档 - [IScript 脚本文档](./IScript.md) -- [类型文档](https://types.ihelpers.xyz/) +- [类型文档](https://types.iautomator.xyz/) - [Youtube 视频](https://www.youtube.com/watch?v=L7DpcRtkq2U) ## 开发 @@ -300,7 +300,7 @@ yarn build [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 diff --git a/package.json b/package.json index eea0d9c..f38ca9c 100755 --- a/package.json +++ b/package.json @@ -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", diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 7b987f9..a9d0cad 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -1,6 +1,6 @@ { "extName": { - "message": "iHelpers: automation/shortcuts" + "message": "iAutomator: automation/shortcuts" }, "extDesc": { "message": "Browser Automation Productivity Tools" diff --git a/public/_locales/zh_CN/messages.json b/public/_locales/zh_CN/messages.json index 4502b62..dc00387 100644 --- a/public/_locales/zh_CN/messages.json +++ b/public/_locales/zh_CN/messages.json @@ -1,6 +1,6 @@ { "extName": { - "message": "iHelpers:捷径/快捷指令/自动化" + "message": "iAutomator:捷径/快捷指令/自动化" }, "extDesc": { "message": "浏览器自动化效率工具" diff --git a/src/builtin/Note.ts b/src/builtin/Note.ts index 3053559..0cc629e 100644 --- a/src/builtin/Note.ts +++ b/src/builtin/Note.ts @@ -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; diff --git a/src/helper/libs.ts b/src/helper/libs.ts index ee5919b..5b202e4 100644 --- a/src/helper/libs.ts +++ b/src/helper/libs.ts @@ -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; diff --git a/src/pages/content/app.ts b/src/pages/content/app.ts index 0c66405..726dbb4 100644 --- a/src/pages/content/app.ts +++ b/src/pages/content/app.ts @@ -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); + }); }); } } diff --git a/src/pages/popup/components/Automation.tsx b/src/pages/popup/components/Automation.tsx index 43f48da..0be29fb 100644 --- a/src/pages/popup/components/Automation.tsx +++ b/src/pages/popup/components/Automation.tsx @@ -88,7 +88,7 @@ function Buttons() { - chrome.tabs.create({ url: "https://ihelpers.xyz/automations" }) + chrome.tabs.create({ url: "https://iautomator.xyz/automations" }) } icon={
  • -
  • -
  • diff --git a/src/server/db/database.ts b/src/server/db/database.ts index 596bba2..ac8bc50 100644 --- a/src/server/db/database.ts +++ b/src/server/db/database.ts @@ -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; records: Dexie.Table; automations: Dexie.Table; @@ -90,7 +90,7 @@ export interface IShortcut { deleted?: boolean; } -let db: IHelpersDatabase; +let db: IAutomatorDatabase; export async function getDb() { if (db) { @@ -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);