Skip to content

Commit

Permalink
updated version to 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit committed Dec 20, 2013
1 parent 13257f4 commit 2b0e1cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions stylebot/background/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,12 @@
* Version updates
* This is the only place you need to update the version string
* besides manifest.json.
*
* Only update the version string here if you want to show a
* notification.
*/
var VERSION = '2';

/**
* Updates the version of extension.
* Updates the data model if required.
*/
function updateVersion(callback) {
chrome.storage.local.get(['version'], function(storage) {
if (storage['version'] != VERSION) {
chrome.storage.local.set({'version': VERSION});
showUpdateNotification();
}

callback();
});
}

/**
* Show notification for version update
*/
Expand All @@ -34,3 +22,17 @@ function showUpdateNotification() {
}
}

/**
* Updates the version of extension stored in storage
* and data model if required.
*/
function updateVersion(callback) {
chrome.storage.local.get(['version'], function(storage) {
if (storage['version'] !== VERSION) {
chrome.storage.local.set({'version': VERSION});
showUpdateNotification();
}

callback();
});
}
4 changes: 2 additions & 2 deletions stylebot/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"manifest_version": 2,
"name" : "Stylebot",
"version" : "2.1",
"description" : "Change the appearance of websites instantly. Preview and install styles created by users for your favorite websites",
"version" : "2.2",
"description" : "Change the appearance of websites instantly. Preview and install styles created by other users on stylebot.me",

"background" : {
"scripts": [
Expand Down

0 comments on commit 2b0e1cf

Please sign in to comment.