Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 766 Bytes

File metadata and controls

14 lines (11 loc) · 766 Bytes

Browser extension

Extension that can communicate with native-app to change the state of Mystic Light devices on browser events

How does it work

  • the extension is build using Plasmo Framework
  • extension reads config file that is populated from the native-app (and that is why extension requires "Allow access to file URLs") in order to figure out how to communicate with it
  • extension adds listener for browser fullscreen events
  • when browser enters fullscreen the extension:
    • requests current devices state and stores it in memory
    • sends new state for devices with disabled lighting
  • when browser exists fullscreen the extension:
    • sends previous stored state to revert it to previous state