forked from ansh/jiffyreader.com
-
-
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.
* Feat: add latex check Chore: improve makeExcluder, add textarea to globally excluded elements * Update: delay auto on when latex is present * Update: declare autoOnDelay on default prefs * Update: rewrite saved prefs when app is installed or updated * Chore: simplify and type code * Chore: improve index.d.ts * Chore: update types * Chore: fix typo
- Loading branch information
1 parent
25bd4b2
commit 0c54540
Showing
9 changed files
with
192 additions
and
189 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,57 +1,39 @@ | ||
interface Prefs { | ||
onPageLoad: boolean; | ||
scope: string; //"global" | "local" | ||
lineHeight: number; | ||
edgeOpacity: number; | ||
saccadesColor: string; | ||
saccadesStyle: string; | ||
saccadesInterval: number; | ||
fixationStrength: number; | ||
fixationEdgeOpacity: number; | ||
MAX_FIXATION_PARTS: number; | ||
FIXATION_LOWER_BOUND: number; | ||
BR_WORD_STEM_PERCENTAGE: number; | ||
} | ||
import type defaultPrefs from '~services/preferences'; | ||
|
||
type Prefs = typeof defaultPrefs; | ||
type PrefRecords = Record<string, Pref>; | ||
|
||
interface PrefStore { | ||
global: Prefs; | ||
local: PrefRecords; | ||
global: Prefs; | ||
local: PrefRecords; | ||
} | ||
|
||
interface TabSession { | ||
brMode: boolean; | ||
origin?: string; | ||
tabID?; | ||
brMode: boolean; | ||
origin?: string; | ||
tabID?; | ||
} | ||
|
||
type TabSessionStore = Record<string, TabSession>; | ||
|
||
type UpdateCallback = (tabSessions: PrefRecords) => PrefRecords; | ||
|
||
type SetPrefsExternal = ( | ||
getOrigin: () => Promise<string>, | ||
scope: string, | ||
newPrefs: Prefs, | ||
deleteOldLocal?: boolean, | ||
) => Promise<void>; | ||
type SetPrefsExternal = (getOrigin: () => Promise<string>, scope: string, newPrefs: Prefs, deleteOldLocal?: boolean) => Promise<void>; | ||
|
||
type removeTabSession = (getTab: () => Promise<chrome.tabs.Tab>) => Promise<void>; | ||
|
||
|
||
interface AppConfigPref { | ||
displayColorMode: DisplayColorMode; | ||
displayColorMode: DisplayColorMode; | ||
} | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
DEBUG: string; | ||
TARGET: string; | ||
SHORTCUT: string; | ||
VERSION: string; | ||
NAME: string; | ||
} | ||
interface ProcessEnv { | ||
DEBUG: string; | ||
TARGET: string; | ||
SHORTCUT: string; | ||
VERSION: string; | ||
NAME: string; | ||
} | ||
} | ||
|
||
declare module '*.scss'; |
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
Oops, something went wrong.