Skip to content

Repository files navigation

Chrome Lock

Chrome Lock is a Manifest V3 Chrome extension that asks for a password when the browser starts, intended for shared or workplace computers.

Overview

Once you set a password, the extension prompts for it whenever Chrome launches. Until the correct password is entered your open tabs are closed away and you cannot browse; entering it restores the previous tabs.

The extension is written in vanilla JavaScript on Chrome's Manifest V3 platform, using a background service worker and chrome.storage.local. There is no build step, no framework, and no external server; everything runs locally in the browser.

Security note: this extension is a deterrent, not a security control. The password is stored in plain text in chrome.storage.local — it is not hashed or encrypted — and the lock is enforced in the UI layer. Use it to discourage casual access on shared machines, not as protection against a determined user or as a replacement for OS account passwords or disk encryption.

Features

  • Set a master password from the setup page.
  • Chrome prompts for the password on every launch while one is set.
  • Open tabs are closed during lock and re-opened after unlock.
  • Submit the password with the Enter key or the button.
  • Vanilla JavaScript, no build tools, no external network calls.
  • Manifest V3 with a background service worker.
  • Change the password at any time from the extension's options page.

Tech stack

Layer Technology
Platform Chrome Extension, Manifest V3
Background Service worker (bg.js)
Storage chrome.storage.local
Permissions storage, tabs
UI HTML, CSS, vanilla JavaScript

Requirements

  • Google Chrome, or any Chromium-based browser that supports Manifest V3

Installation (load unpacked)

git clone https://github.com/morpheusadam/ChromeLock.git
  1. Open Chrome and navigate to chrome://extensions.
  2. Enable Developer mode using the toggle in the top-right corner.
  3. Click Load unpacked and select the project folder.
  4. Pin the extension for easy access.

Usage

  1. After installing, the set-password page opens automatically.
  2. Enter the same password in both fields to save it.
  3. From then on, when Chrome starts the enter-password page appears and your tabs are locked away.
  4. Type your password and press Enter, or click the button, to unlock and restore your tabs.
  5. To change the password, open the extension's options page and set a new one.

If you forget the password, remove and re-add the extension via chrome://extensions. This clears the stored password.

Permissions

Permission Why it is needed
storage Store and read the password in chrome.storage.local.
tabs Close tabs while locked and re-open them after unlocking.

Project structure

Chrome-Password/
├── manifest.json          # MV3 manifest (permissions: storage, tabs)
├── bg.js                  # service worker: lock/unlock + tab handling
├── set-password.html      # password setup UI
├── set-password.js        # saves the password to chrome.storage.local
├── enter-password.html    # unlock prompt UI
├── enter-password.js      # validates entry & releases the lock
├── assets/                # icons, screenshots & styles
│   ├── icons/
│   └── style/
└── data/verified_contents.json

Contributing

Open an issue or submit a pull request. Security-hardening changes, such as hashing the stored password or adding an idle auto-lock, are particularly useful.

License

Distributed under the MIT License. See LICENSE for details, or the repository license if present.

Author

Morpheus Adam — web developer, PHP, Laravel, Go.

About

Chrome Lock — a lightweight Manifest V3 extension that password-protects your browser on startup.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages