Skip to content

Commit

Permalink
recording the extension's version in local storage
Browse files Browse the repository at this point in the history
it's very useful to make changes between updates
  • Loading branch information
samuelsimoes committed Feb 18, 2017
1 parent 45ec4de commit 5f10003
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import * as runtimeEventsTypes from './constants/runtimeEventsTypes'
import * as runningItemRepository from './repositories/runningItem'
import runningItemInfos from './utils/runningItemInfos'
import { presentMinutesDuration } from './utils/presentDuration'
import migrator from './utils/migrator'

migrator()

function renderMinutesBadge (leftTimeInSeconds, late) {
let color = late ? '#ED3E3E' : '#0044A9'
Expand Down
3 changes: 3 additions & 0 deletions src/js/utils/migrator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function () {
window.localStorage.setItem('current-version', window.chrome.runtime.getManifest().version)
}

0 comments on commit 5f10003

Please sign in to comment.