File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ function mill2Str(milliseconds: number) {
1515}
1616
1717function setBadgeText ( milliseconds : number | undefined ) {
18- console . log ( 'mills' , milliseconds )
1918 const text = milliseconds === undefined ? '' : mill2Str ( milliseconds )
2019 chrome . browserAction
2120 && chrome . browserAction . setBadgeText
Original file line number Diff line number Diff line change 1+ import { formatTime } from "../../util/time"
12import TimerContext from "./context"
23
34function listen ( context : TimerContext , newState : chrome . idle . IdleState ) {
4- if ( newState !== 'active' ) {
5- // If not active then pause
6- context . pause ( )
7- } else {
8- // Or resume
5+ if ( newState === 'active' ) {
96 context . resume ( )
7+ } else if ( newState === 'locked' ) {
8+ // If locked then pause
9+ context . pause ( )
10+ } else if ( newState === 'idle' ) {
11+ // do nothing
1012 }
1113}
1214
You can’t perform that action at this time.
0 commit comments