Skip to content

leoleiden/SelectionSK_RebirthV3

Repository files navigation

🧩 SelectionSK: MV3 Rebirth

Manifest V3 Architecture Security JavaScript

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.

🛠 Key Architectural & Security Upgrades

  • Stateless Event-Driven Architecture: Converted the legacy, persistent background.js into an event-driven service-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.local model to preserve state seamlessly across service worker restarts.
  • API Modernization: Replaced deprecated APIs with the modern chrome.runtime, chrome.scripting, and chrome.action namespaces, 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.js and colors.css to ensure the dynamic selection menu renders reliably across varied modern site DOM structures without CSS bleeding or layout disruption.

📥 How to Install (Developer Mode)

Since this is a custom Manifest V3 port, you can install it manually:

  1. Download or clone this repository to your local machine.
  2. Open Chrome (or any Chromium-based browser) and navigate to chrome://extensions/.
  3. Enable Developer mode in the top right corner.
  4. Click Load unpacked and select the folder containing this repository.
  5. Enjoy the revived SelectionSK!

📖 Developer's Note

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.

⚖️ Credits & License

  • 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.txt for full details.

About

A modernized Manifest V3 revival of the SelectionSK browser extension for instant access to web tools upon text selection

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors