Methods
parseAndAttachCSS(settings)
Parses extension settings and creates a new stylesheet before attaching it to the DOM
Parameters:
Name | Type | Description |
---|---|---|
settings |
ExtensionSettings |
- Source:
start()
Starts the extension content_script after a timeout. The timeout here is used to avoid expensive wasted scans for browsers that support MutationObserver.
- Source:
- See:
-
- scanDOM
updatePreview(settings)
Updates sample preview text in reaction to settings changes
Parameters:
Name | Type | Description |
---|---|---|
settings |
ExtensionSettings |
- Source:
updateSelectorValue(selector, storage)
Updates selector values
Parameters:
Name | Type | Description |
---|---|---|
selector |
HTMLElement | |
storage |
object | destructured storage data |
- Source:
(async) updateStorage(updatedSelector)
Updates StorageArea with new settings
Parameters:
Name | Type | Description |
---|---|---|
updatedSelector |
HTMLElement | element which value has changed |
- Source:
updateValueDisplay(selector)
Updates the value textual display next to range selectors
Parameters:
Name | Type | Description |
---|---|---|
selector |
HTMLElement |
- Source:
updateVisualDefaults(storage)
Sets defaults upon settings page load
Parameters:
Name | Type | Description |
---|---|---|
storage |
object |
- Source:
watchSelector()
Watches selectors for changes
- Source:
Type Definitions
ExtensionSettings
Extension settings custom schema
Type:
- Object
Properties
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
style |
object | defines style values
Properties
|
|||||||||||||||
styleUnits |
object | defines style units
Properties
|
|||||||||||||||
linesPerParagraph |
number | lines per paragraph | |||||||||||||||
wordsPerLine |
number | words per line | |||||||||||||||
autoScan |
boolean | auto scan page for p tags | |||||||||||||||
styleEnable |
boolean | enables style modifications | |||||||||||||||
DOMEnable |
boolean | enables dom modifications |
- Source:
MutationList
Extension settings custom schema
Type:
- array
Properties
Name | Type | Description |
---|---|---|
MutationRecord |
MutationRecord | defines style values |
- Source: