This Chrome extension overrides the New Tab page and provides:
- Search box with selectable engines
- Wallpaper (local + remote sources)
- Shortcuts grid with edit mode, icon editor, drag & drop
- Settings sidebar (persisted via
chrome.storage.local)
Top-level files:
newtab.html: New Tab UI markup. Loads scripts in this order:i18n.js(global i18n compatibility)script.js(type="module"entry)
script.js: Thin entry that importssrc/app.jsi18n.js: IIFE-style script that still exports compatibility globals (t,setLanguage,currentLanguage)src/style.css: Styling + app-ready gating to prevent FOUCmanifest.json: Extension configuration
Module code (ES Modules) lives under src/:
src/app.js: App bootstrap; buildsctx, loads storage, applies settings, initializes featuressrc/background.js: Service Worker for WebDAV proxying (CORS bypass) and logicsrc/state.js: Central state model and helperssrc/dom.js: DOM element lookup + DOM-related helperssrc/constants.js: Shared constants
Features (UI behavior by area):
src/features/search.js: Search engine + submit behaviorsrc/features/settingsPanel.js: Settings sidebar UI + persistencesrc/features/shortcuts.js: Shortcuts grid, edit mode, icon editor, DnD, paginationsrc/features/sidebar.js: Sidebar toggling + layout wiringsrc/features/wallpaper.js: Wallpaper source handling + refreshsrc/features/sync.js: WebDAV synchronization logic (V2 with binary support)
Utilities:
src/utils/storage.js: Promise wrappers forchrome.storage.*src/utils/db.js: IndexedDB wrapper for large asset storage (Wallpapers/Icons)src/utils/images.js: Image formatting, compression, and analysis helperssrc/utils/favicon.js: Favicon URL generatorssrc/utils/webdav.js: WebDAV Client implementation
UI glue:
src/ui/settingsApply.js: Apply persisted settings to CSS vars / DOM
- Stable entrypoints:
newtab.htmlcontinues to loadscript.js, so file moves don’t require HTML changes. - Compatibility i18n:
i18n.jsis isolated internally, but keepsglobalThis.t/setLanguagefor older callers. - FOUC prevention: UI is hidden until storage-backed settings have been applied (via
body.app-ready). - Icon resilience: When choosing online icons, icons are cached as
data:URLs to survive offline reloads.
- Open
chrome://extensions/ - Enable Developer mode
- Click Load unpacked
- Select this folder
The extension supports syncing settings and assets (wallpapers, shortcut icons) via WebDAV.
- Open Settings -> Data Sync (WebDAV).
- Enter your WebDAV Server URL, Username, and Password.
- Click Check Connection to verify.
- Use the buttons to sync:
- Upload: Overwrites remote data with your local data.
- Download: Overwrites local data with remote data.
- Merge: Downloads remote data and merges it with local data (Remote settings overwrite local; Shortcuts are combined by URL).
See TESTING.md.
- This repo uses ES Modules in the New Tab page context.
- Persisted data is stored in
chrome.storage.local. - Binary assets (Wallpapers/Icons) are stored in IndexedDB.
If you like this extension, you can buy me a coffee!
| WeChat Pay | |
|---|---|
![]() |
![]() |
Feel free to sponsor and connect with me!

