This repository contains the modernized revival of SelectionSK, a powerful browser extension designed to provide instant access to web tools (search, translation, currency conversion, and more) upon text selection.
This project represents a complete architectural refactoring of a legacy codebase to meet the strict security and execution constraints of Google's Manifest V3 standard.
- Stateless Event-Driven Architecture: Converted the legacy, persistent
background.jsinto an event-drivenservice-worker.js. Refactored the core logic to be entirely stateless, ensuring reliable execution even after the worker goes idle to optimize browser memory consumption. - Security & CSP Compliance: Stripped all inline scripts and dynamically evaluated code (
eval()) to strictly comply with the new Content Security Policy (CSP). Enforced strict sandboxing and resource isolation standards. - State & Storage Migration: Since background pages are no longer persistent in MV3, all configuration data and user preferences were migrated to an asynchronous
chrome.storage.localmodel to preserve state seamlessly across service worker restarts. - API Modernization: Replaced deprecated APIs with the modern
chrome.runtime,chrome.scripting, andchrome.actionnamespaces, ensuring future-proof execution. - Custom i18n & UI Refactoring: Engineered a custom language selection logic inside the settings (
prefs.html), allowing manual UI language overrides independent of the browser's locale. Implemented a full Ukrainian localization from scratch. - Content Script Isolation: Refined the DOM injection logic in
content.jsandcolors.cssto ensure the dynamic selection menu renders reliably across varied modern site DOM structures without CSS bleeding or layout disruption.
Since this is a custom Manifest V3 port, you can install it manually:
- Download or clone this repository to your local machine.
- Open Chrome (or any Chromium-based browser) and navigate to
chrome://extensions/. - Enable Developer mode in the top right corner.
- Click Load unpacked and select the folder containing this repository.
- Enjoy the revived SelectionSK!
SelectionSK has been an essential productivity tool for me for years. When Chrome deprecated Manifest V2, this extension broke entirely. Rather than accepting the loss of a great tool, I used this as an opportunity to reverse-engineer the legacy codebase, refactor it into a modern stateless architecture, and enforce strict modern security policies.
This port is my way of ensuring an excellent open-source project lives on while demonstrating practical skills in legacy code migration, state management, and strict security compliance. Huge respect to the original author for the foundational logic.
- Original Code & Concept: Andrey Shemetov (ashemetov@gmail.com)
- V3 Revival Port & Refactoring: Leonid Lachmann (leocyanid@gmail.com) | DevOps & Platform Engineer
- License: This project continues to be licensed under MPL 1.1 / GPL 3.0+ / LGPL 3.0+ in accordance with the original source code. See
license.txtfor full details.