This project is a browser extension for Firefox that adds an OpenAI icon to tweets on Twitter. When you click the icon, a modal opens up where you can ask the OpenAI assistant to explain the tweet or provide more information about its content.
- Download the zip file from github, 2 options:
- https://github.com/juan-m12i/twitter-gpt-browser-extension/tags -> get the latest one and click the zip icon
- https://github.com/juan-m12i/twitter-gpt-browser-extension -> click on "<> Code" - Download Zip
- Unzip the file in a folder
- Create a file called 'secrets.js' in the
source
directory - Add your OpenAI API key to the file:
const OPEN_AI_API_KEY = "your_openai_api_key";
Replace "your_openai_api_key" with your actual OpenAI API key.
5. Select all the files in the source
directory and add them to a zip file / compress them (the file can be named anything)
- Clone this repository.
- Create a
secrets.js
file in thesource
directory of the project. - Add your OpenAI API key to the file:
const OPEN_AI_API_KEY = "your_openai_api_key";
Replace "your_openai_api_key" with your actual OpenAI API key.
- Run the build.sh script to create the browser extension:
./build.sh
or
sh build.sh
This script will create an Extension.zip file in the /dist folder.
- In Firefox, go to about:debugging#/runtime/this-firefox
- Click "Load Temporary Extension" and select the Extension.zip file from the /dist folder.
- Go to twitter.com and click the OpenAI icon next to each tweet Add tests to ensure the functionality of the extension.
- Add tests to ensure the functionality of the extension.
- Improve the look and feel of the modal by integrating a CSS framework.
- Investigate and fix the issue where the OpenAI logo is sometimes duplicated.
- Further refactor the code, moving OpenAI logic from the modal to the OpenAI API file.