- Nothing, OR we completed a timer yesterday
- There is a timer going + what type/time
- We've completed a timer today + what type/time
- Whether we have an active notification (by ID)
- Whether we have an active alarm (by ID)
- You click the main icon
- You click a specific context menu:
- ... TODO
- You click a desktop notification
- The app is about to go inactive
- An alarm you registered has fired
- Browser goes to sleep (so inactive SW), but you want timer to continue
- Drift over time with 20 second ping?
- (Good?) Having a listener keeps stuff open
onStartupandonSuspendseem to be CHROME open/closing
Design the above to persist all state when we stop timer
Chrome example showing storage sync with an event:
chrome.storage.onChanged.addListener((changes, namespace) => {
for (let [key, { oldValue, newValue }] of Object.entries(changes)) {
console.log(
`Storage key "${key}" in namespace "${namespace}" changed.`,
`Old value was "${oldValue}", new value is "${newValue}".`
);
}
});Need an options item for this
... Started thinking through: just need to hook through?
- Open Settings Page
- Restart Timer (from active/break, just set nextNotify + update badge text)
- Pause (treat as icon-click)
- Restart Cycle ()