Work
Engineering/2022/Active
Google Word Lookup Extension
A simple extension that allows you to navigate to the Google page of any word you highlight.
JavaScript
Overview
This is a minimal Manifest V3 Chrome extension (internally named Text-to-Google in its manifest) that adds a right-click "Search on Google" entry to the browser's context menu. Select any text on a page, right-click, and it opens a new tab with a Google search for that selection. The entire implementation is a single background service worker — no content script, popup, or options page.
Key Features
- Context-menu integration — registers a "Search on Google" item that appears only when text is selected (
contexts: ["selection"]), via thechrome.contextMenusAPI - New-tab search — builds the query URL directly from the highlighted text (
https://www.google.com/search?q=<selection>) and opens it withchrome.tabs.create, leaving the current tab untouched - Minimal permissions — the manifest requests only
contextMenusandtabs; no host permissions or content-script injection
Installation
The extension isn't published to the Chrome Web Store — install it unpacked:
git clone https://github.com/chethanyadav456/Google-Extension.git- Open
chrome://extensionsin Chrome (or another Chromium-based browser) - Enable Developer mode
- Click Load unpacked and select the cloned
Google-Extensionfolder - Highlight any text on a page, right-click, and choose Search on Google