豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

devndesigner6/DarkVision-Toolkit

Repository files navigation

DarkVision Toolkit

DarkVision Toolkit is a Chrome extension that applies customizable dark mode styles to websites. It provides presets, per-site themes, eye comfort adjustments (color temperature, blue light filter, auto-dimming), a contrast checker, import/export, and keyboard shortcuts.

Install (developer/unpacked)

  1. Open Chrome and go to chrome://extensions
  2. Enable "Developer mode"
  3. Click "Load unpacked" and select the DarkVision-Toolkit folder from this repository

Files

  • manifest.json - extension manifest (MV3)
  • popup.html, popup.css, popup.js - UI for controls and live preview
  • service_worker.js - background service worker for commands and storage sync
  • content_script.js - injected script that applies CSS to pages
  • themes/ - sample theme JSON files
  • icons/ - SVG icons used in the UI
  • icons/raster/ - optimized raster PNG icons (user-supplied). The extension uses icons/raster/logo1.png as the toolbar/action icon and icons/raster/manifest-icon-*.png for manifest sizes.

Quick usage

  • Open the extension popup and use presets or color pickers to change background, text, link, and accent colors.
  • Use the toggle button or keyboard shortcut (Ctrl/Cmd+Shift+Y) to enable/disable dark mode on the current site.
  • Save per-site themes with the Save button. Import/export JSON via the menu.

Developer notes

  • Uses Manifest v3 and the scripting API to inject the content script and update styles.
  • Stores preferences in chrome.storage.sync when possible and falls back to local.

Settings

Open the options page (right-click the extension -> Options) or open settings.html for choosing storage (sync vs local) and auto-dim settings.

Tests

This repository includes a tiny Jest test harness for utility functions. To run tests:

  1. Open a terminal in the C:\Users\hp\DarkVision-Toolkit folder
  2. Run:
npm install
npm test

Sample themes

See themes/ for presets (amoled.json, gray.json, midnight.json, blue.json).

License

MIT

About

DarkVision Toolkit is a Chrome extension that applies customizable dark mode styles to websites. It provides presets, per-site themes, eye comfort adjustments (color temperature, blue light filter, auto-dimming), a contrast checker, import/export, and keyboard shortcuts.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors