https://github.com/omgreenfield/omg-tamper-monkey
A collection of TamperMonkey scripts to add Chrome hotkeys to ChatGPT and other websites.
https://github.com/omgreenfield/omg-tamper-monkey
chatgpt github tampermonkey
Last synced: about 2 months ago
JSON representation
A collection of TamperMonkey scripts to add Chrome hotkeys to ChatGPT and other websites.
- Host: GitHub
- URL: https://github.com/omgreenfield/omg-tamper-monkey
- Owner: omgreenfield
- Created: 2024-07-23T03:55:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-13T18:27:52.000Z (over 1 year ago)
- Last Synced: 2025-04-01T12:50:49.965Z (about 1 year ago)
- Topics: chatgpt, github, tampermonkey
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OMG Tampermonkey
- [Tampermonkey](#tampermonkey)
- [User scripts](#user-scripts)
- [`util.js`](#utiljs)
- [`chat_gpt_hotkeys.js`](#chat_gpt_hotkeysjs)
- [`github_hotkeys.js`](#github_hotkeysjs)
## Tampermonkey
[Tampermonkey](https://www.tampermonkey.net/) is a browser extension used to add custom JavaScript to pages that match a filter you specify.
Although `Tampermonkey` is one word, I decided to separate `tamper` and `monkey` in the repo name.
## User scripts
The scripts in this repo add hotkeys to pages I used frequently, e.g. ChatGPT and GitHub.
Rather than the typical `YYYY-MM-DD` date format, I use `MM_DD_YYYY` because I use it other personal documents and I have a hotstring for it (via [AutoHotkey](https://autohotkey.com/) for Windows, [Keyboard Maestro](https://www.keyboardmaestro.com/) for Mac).
### `util.js`
Rather than using a library like lodash or jQuery, I include only the functions necessary to accomplish tasks I need: locating elements and registering hotkeys
Because other user scripts use these functions, I include the `@run-at document-start` directive while others use `@run-at document-end`.
The other user scripts below:
1. Define functions for each custom action
2. Call `window.registerHotkeys` to associate a key combination with each function
### `chat_gpt_hotkeys.js`
Adds hotkeys to `https://chatgpt.com/*` including:
- Focus chat textarea
- Start new chat
- Edit last message
- Submit/cancel edited message
- Toggle sidebar
- Scroll to top/bottom
### `github_hotkeys.js`
Adds hotkeys to `https://github.com/*/pull/*` (i.e. pull requests) including:
- Navigate to Conversation
- Navigate to Commits
- Navigate to Checks
- Navigate to Files
- Edit PR title
- Edit PR body
- (WIP) Cancel editing