Skip to content

Commit

Permalink
Steam notification option upgrade, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrance committed Aug 2, 2015
1 parent f3f0dc1 commit 18579ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Homely/manifest.json
Expand Up @@ -2,7 +2,7 @@
"name": "Homely",
"short_name": "Homely",
"description": "A custom New Tab page, providing a quick, customizable layout of links and menus, as well as simple bookmark and history components.",
"version": "1.5.2",
"version": "1.5.3",
"author": "Ollie Terrance",
"homepage_url": "https://github.com/OllieTerrance/Homely",
"incognito": "split",
Expand Down
16 changes: 12 additions & 4 deletions Homely/res/js/homely.js
Expand Up @@ -188,7 +188,7 @@ $(document).ready(function() {
"enable": false
},
"steam": {
"emable": {
"enable": {
"comments": false,
"inventory": false,
"invites": false,
Expand Down Expand Up @@ -268,6 +268,17 @@ $(document).ready(function() {
if (!firstRun) settings.links.content = store.links.content;
// merge settings with defaults
settings = $.extend(true, {}, settings, store);
// upgrade code for Steam
if (typeof(settings.notifs["steam"].enable) === "boolean") {
var enable = settings.notifs["steam"].enable;
settings.notifs["steam"].enable = {
"comments": enable,
"inventory": enable,
"invites": enable,
"gifts": enable,
"messages": enable
};
}
// apply custom styles
document.title = settings.general["title"];
var css = [];
Expand Down Expand Up @@ -2104,7 +2115,6 @@ $(document).ready(function() {
var off = true;
for (var x in settings.notifs["facebook"].enable) {
if (settings.notifs["facebook"].enable[x]) off = false;
break;
}
if (off) revoke("facebook");
settings.notifs["github"] = {
Expand Down Expand Up @@ -2133,7 +2143,6 @@ $(document).ready(function() {
off = true;
for (var x in settings.notifs["linkedin"].enable) {
if (settings.notifs["linkedin"].enable[x]) off = false;
break;
}
if (off) revoke("linkedin");
settings.notifs["outlook"] = {
Expand All @@ -2154,7 +2163,6 @@ $(document).ready(function() {
off = true;
for (var x in settings.notifs["steam"].enable) {
if (settings.notifs["steam"].enable[x]) off = false;
break;
}
if (off) revoke("steam");
settings.notifs["ticktick"] = {
Expand Down

0 comments on commit 18579ba

Please sign in to comment.