mirror of
https://github.com/He4eT/tabswitcher.git
synced 2026-05-05 09:27:25 +00:00
Feat: Add configurable font setting and fix Windows font fallback
Added extension options page and configurable font settings. Fixed font fallback issue on Windows.
This commit is contained in:
parent
5bc492d866
commit
aee213e96d
5 changed files with 92 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
|||
html, body {
|
||||
font-family: sans;
|
||||
font-family: var(--user-font, system-ui, -apple-system, "Segoe UI", sans-serif);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
// Load User Font Preference immediately
|
||||
browser.storage.sync.get("userFont").then((result) => {
|
||||
const fontStack = result.userFont
|
||||
? `${result.userFont}, system-ui, sans-serif` // User choice + fallback
|
||||
: `system-ui, -apple-system, "Segoe UI", sans-serif`; // Default fallback
|
||||
|
||||
document.documentElement.style.setProperty('--user-font', fontStack);
|
||||
});
|
||||
|
||||
import * as Store from './modules/store.js'
|
||||
import * as bridge from './modules/bridge.js'
|
||||
import * as dom from './modules/dom.js'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue