Extensions add specific functionality to Items API. They rely on modules within LT being available.
--
Renders a reading mask that helps users focus on specific parts of the content. The reading mask is a semi-transparent overlay that highlights the area around the mouse cursor, allowing users to read text more easily without distractions. It can be toggled on and off, and it updates its position based on mouse movements
Methods
hide() → {void}
Hides the reading mask if it is currently visible. If the mask is already hidden, it does nothing.
- Since
- 3.0.0
- Returns:
- void
run()
Initializes the reading mask extension.
- Since
- 3.0.0
Example
import { LT } from '@caspingus/lt/assessment';
LT.init(itemsApp); // Set up LT with the Items API application instance variable
LT.extensions.readingMask.run();
show() → {void}
Shows the reading mask if it is currently hidden. If the mask is already visible, it does nothing.
- Since
- 3.0.0
- Returns:
- void
toggle() → {boolean}
Shows or hides the reading mask.
- Since
- 3.0.0
- Returns true if the reading mask is currently visible, false otherwise.
- Returns:
- boolean