new DOMManipulator(settings)
Parameters:
Name | Type | Description |
---|---|---|
settings |
ExtensionSettings |
Properties
Name | Type | Description |
---|---|---|
observationEnabled |
boolean | |
settings |
ExtensionSettings | |
settings |
ExtensionSettings |
- Source:
Methods
formatNode(node)
Formats paragraphs according to settings
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElement | Text content of paragraphs |
- Source:
getNewTrackingList() → {array}
Gets the new tracking list based on whether it's the same page
- Source:
Returns:
array of HTMLElement
- Type
- array
observe(mutationList)
Observation handler
Parameters:
Name | Type | Description |
---|---|---|
mutationList |
array | Array of MutationRecord's |
- Source:
reformatDOM()
Uses the list of currently tracked
tags and formats them according to settings
- Source:
scanDOM()
Scans the DOM for
tags and listens for changes to the dom. Uses MutationObserver to check for DOM mutations and an interval for older browsers.
- Source:
setState(newTrackingList)
Defers and updates state
Parameters:
Name | Type | Description |
---|---|---|
newTrackingList |
array | A new list of tags |
- Source:
shouldUpdate(newDOM, oldDOM)
Parameters:
Name | Type | Description |
---|---|---|
newDOM |
DOMTree | |
oldDOM |
DOMTree |
- Source:
toggleObservation()
Toggles the observation handler
- Source: