Chrome Lock is a Manifest V3 Chrome extension that asks for a password when the browser starts, intended for shared or workplace computers.
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.
- 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.
| Layer | Technology |
|---|---|
| Platform | Chrome Extension, Manifest V3 |
| Background | Service worker (bg.js) |
| Storage | chrome.storage.local |
| Permissions | storage, tabs |
| UI | HTML, CSS, vanilla JavaScript |
- Google Chrome, or any Chromium-based browser that supports Manifest V3
git clone https://github.com/morpheusadam/ChromeLock.git- Open Chrome and navigate to
chrome://extensions. - Enable Developer mode using the toggle in the top-right corner.
- Click Load unpacked and select the project folder.
- Pin the extension for easy access.
- After installing, the set-password page opens automatically.
- Enter the same password in both fields to save it.
- From then on, when Chrome starts the enter-password page appears and your tabs are locked away.
- Type your password and press Enter, or click the button, to unlock and restore your tabs.
- 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.
| 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. |
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
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.
Distributed under the MIT License. See LICENSE for details, or the repository license if present.
Morpheus Adam — web developer, PHP, Laravel, Go.
- GitHub: morpheusadam
- Website: sam.zeonic.me
- Email: morpheusadam95@gmail.com