Skip to content

Commit

Permalink
Release 0.1.1
Browse files Browse the repository at this point in the history
- Add README.md
- 移除不必要的 console.log 訊息
- 修正 manifest.json 中顯示作者的名稱
  • Loading branch information
doggy8088 committed Feb 27, 2023
1 parent 87b51e1 commit 5f28fa0
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

- 0.1.1 (2023/02/28)

- Add README.md
- 移除不必要的 console.log 訊息
- 修正 manifest.json 中顯示作者的名稱

- 0.1.0 (2023/02/26)

- Initial release
3 changes: 3 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 發行套件時的注意事項

1. 首頁網址: https://github.com/doggy8088/ChatGPTToolkitExtension
83 changes: 83 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ChatGPT 萬能工具箱

提升 ChatGPT 網站的使用體驗,提供一些好用功能。像是自動從 URL 填入提示、在回應的地方出現自動提示按鈕、以及更多好用功能陸續推出。

Chrome 線上應用程式商店: [ChatGPT 萬能工具箱](https://chrome.google.com/webstore/detail/fmijcafgekkphdijpclfgnjhchmiokgp?hl=zh-TW)

## 說明

ChatGPT 萬能工具箱提供 ChatGPT 網站一些好用的額外功能,可以提升 ChatGPT 網站的使用體驗,目前提供的功能有兩種:

1. 自動從 URL 填入提示:這可以讓你把常用的提示詞(Prompt)透過「書籤」的方式保存下來,並在需要的時候可以快速填入。
2. 在 ChatGPT 回應的地方出現自動提示按鈕:有時候 ChatGPT 沒辦法顯示完整的內容,我們會輸入「繼續」讓 ChatGPT 繼續完成,這些常用的提示詞可以透過按鈕自動輸入。

以後會陸續推出好用功能,歡迎大家提供想法與建議。

## 使用說明

1. 在網址列加上 `#autoSubmit=1&prompt=你的提示文字`,例如:

開啟 ChatGPT 網站並填入「你好」且**不會自動送出** (`autoSubmit=0`)

https://chat.openai.com/chat#autoSubmit=0&prompt=你好

開啟 ChatGPT 網站並填入「你好」且**會自動送出** (`autoSubmit=1`)

https://chat.openai.com/chat#autoSubmit=1&prompt=你好

2. 設定為 Chrome / Edge 內建搜尋引擎,例如:

設定方式請參考 [設定預設搜尋引擎和網站搜尋快捷字詞](https://support.google.com/chrome/answer/95426?hl=zh-Hant) 文件!

設定範例:

```txt
搜尋引擎: ChatGPT
快捷字詞: g
以 %s 取代查詢的網址: https://chat.openai.com/chat#autoSubmit=1&prompt=%s
```
只要在網址列輸入 `g` 再按 Tab 鍵,就會自動開啟 ChatGPT 並自動填入提示文字。
---
# ChatGPT Toolkit
Enhances your ChatGPT experience with useful features like a Auto-Fill prompt text from URL, common prompts after response, and much more.
Chrome Web Store: [ChatGPT Toolkit](https://chrome.google.com/webstore/detail/fmijcafgekkphdijpclfgnjhchmiokgp?hl=en)
## Description
The ChatGPT Toolbox provides some useful additional features for the ChatGPT website, which can enhance the user experience. Currently, two features are available:
1. Automatic prompt filling from URL: This allows you to save commonly used prompts as bookmarks and quickly fill them in when needed.
2. Automatic prompt buttons in the ChatGPT response: Sometimes ChatGPT is unable to display the entire content, and we need to input "continue" to let ChatGPT complete the response. These commonly used prompts can be automatically entered through a button.
More useful features will be launched in the future, and everyone is welcome to provide ideas and suggestions.
## Instructions
1. Add `#autoSubmit=1&prompt=your_prompt_text` to the URL bar, for example:
Open the ChatGPT website and fill in "hello" **without automatically submitting** (`autoSubmit=0`):
https://chat.openai.com/chat#autoSubmit=0&prompt=hello
Open the ChatGPT website and fill in "hello" **with automatic submission** (`autoSubmit=1`):
https://chat.openai.com/chat#autoSubmit=1&prompt=hello
2. Set it as the default search engine in Chrome / Edge, for example:
Refer to the [Set your default search engine & site search shortcuts](https://support.google.com/chrome/answer/95426?hl=en) document for instructions!
Example settings:
```txt
Search engine: ChatGPT
Shortcut: g
URL with %s in place of query: https://chat.openai.com/chat#autoSubmit=1&prompt=%s
```
Just type `g` in the URL bar and press the Tab key, and ChatGPT will automatically open and fill in the prompt text.
13 changes: 13 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TODO

1. 在每次提問的右邊新增 `Share` 按鈕,可以將目前的 Prompt 分享為 `ChatGPT Toolkit` 可以自動填入的網址。

預設將設定為「不自動送出」(`#autoSubmit=0`)

Icon: https://fonts.google.com/icons?icon.query=copy

Icon SVG:

```xml
<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 96 960 960" width="16"><path d="M180 975q-24 0-42-18t-18-42V312h60v603h474v60H180Zm120-120q-24 0-42-18t-18-42V235q0-24 18-42t42-18h440q24 0 42 18t18 42v560q0 24-18 42t-42 18H300Zm0-60h440V235H300v560Zm0 0V235v560Z"/></svg>
```
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"manifest_version": 3,
"name": "__MSG_chatgpttoolkit_name__",
"description": "__MSG_chatgpttoolkit_description__",
"version": "0.1.0",
"version": "0.1.1",
"default_locale": "zh_TW",
"author": "_MSG_chatgpttoolkit_author__",
"author": "__MSG_chatgpttoolkit_author__",
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
Expand Down
7 changes: 2 additions & 5 deletions scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@

const main = document.querySelector("body");

let counter = 0;

let mutationObserverTimer = undefined;
const obs = new MutationObserver(() => {

Expand Down Expand Up @@ -110,9 +108,6 @@
rebuild_buttons();
}

counter++;
console.log(`MutationObserver: ${counter}`);

// 重新開始觀察
start();

Expand Down Expand Up @@ -211,8 +206,10 @@
// 預設的送出按鈕
button = textarea.parentElement.querySelector("button:last-child");

// 自動從 URL 填入提詞(Prompt)
AutoFillFromURI();

// 自動監控所有 ChatGPT 回應,用以判斷何時要顯示回應按鈕
StartMonitoringResponse();

clearInterval(it);
Expand Down

0 comments on commit 5f28fa0

Please sign in to comment.