-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# VoidTab | ||
![](docs/images/VoidTab-banner-dark.png#gh-dark-mode-only) | ||
![](docs/images/VoidTab-banner-light.png#gh-light-mode-only) | ||
|
||
A void new-tab extension. | ||
A void / blank page for your browser's New Tab page. Tired of annoying items and menus in your home screen? Try VoidTab. | ||
It literally is a blank page with a solid background. You can customize that background to match your browser theme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { config } from "./config.js"; | ||
|
||
// Set colors to default values. | ||
const baseSetup = () => { | ||
chrome.storage.sync.set({ colors: config.colors }); | ||
}; | ||
|
||
// On load, check if `colors` exist. | ||
chrome.storage.sync.get(["colors"], (colors) => { | ||
// Initialize with base colors if not set. | ||
if (!Object.keys(colors).length) baseSetup(); | ||
}); | ||
|
||
// Restore default values on event. | ||
chrome.runtime.onMessage.addListener((message) => { | ||
if (message === "reset-colors") baseSetup(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters