A Chrome extension that provides instant explanations of selected text using Google's Gemini AI.
To use the Gemini Explainer extension, you need to enter your API key directly in the background.js file. Follow these steps:
-
Open the
background.jsfile in your code editor. -
Locate the following line in the
getMeaningFromGeminifunction (around line 185):apiKey = "YOUR_API_KEY_HERE";
-
Replace
"YOUR_API_KEY_HERE"with your actual Gemini API key. Make sure to keep the quotes around your API key. For example:apiKey = "AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxx";
-
Save the changes to the
background.jsfile.
-
Open Google Chrome browser.
-
Navigate to
chrome://extensions/in your address bar. -
Enable "Developer mode" by toggling the switch in the top-right corner.
-
Click the "Load unpacked" button.
-
Browse and select the
GeminiExplainerfolder (the folder containingbackground.js,manifest.json, etc.). -
The extension should now appear in your extensions list and be ready to use.
- Select any text on a webpage.
- Right-click on the selected text.
- Choose "Get Meaning with Gemini" from the context menu.
- A popup will appear with the AI explanation of the selected text.
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Copy the generated key and paste it in the
background.jsfile as described above
Now your extension is ready to use!