Skip to content

Commit

Permalink
Use mobile site for Facebook notification counts
Browse files Browse the repository at this point in the history
Fixes #4.
  • Loading branch information
Terrance committed Jul 16, 2016
1 parent 802362c commit 89a1c4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Homely/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"https://www.amazon.co.uk/",
"https://www.amazon.com/",
"http://cart.payments.ebay.co.uk/",
"https://www.facebook.com/",
"https://www.facebook.com/", "https://m.facebook.com/",
"https://github.com/",
"https://accounts.google.com/", "https://mail.google.com/",
"https://www.linkedin.com/",
Expand Down
10 changes: 5 additions & 5 deletions Homely/res/js/homely.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ $(document).ready(function() {
"amazon-uk": ["https://www.amazon.co.uk/"],
"amazon-usa": ["https://www.amazon.com/"],
"ebay": ["http://cart.payments.ebay.co.uk/"],
"facebook": ["https://www.facebook.com/"],
"facebook": ["https://www.facebook.com/", "https://m.facebook.com/"],
"github": ["https://github.com/"],
"gmail": ["https://accounts.google.com/", "https://mail.google.com/"],
"linkedin": ["https://www.linkedin.com/"],
Expand Down Expand Up @@ -1477,7 +1477,7 @@ $(document).ready(function() {
"facebook": {
title: "Facebook",
icon: "facebook-square",
api: "https://www.facebook.com",
api: "https://m.facebook.com",
items: function(notif) {
var menu = [];
if (notif.enable.notifs) menu.push({
Expand All @@ -1496,9 +1496,9 @@ $(document).ready(function() {
},
count: function(notif, resp) {
var vals = [];
if (notif.enable.notifs) vals.push(parseInt($("#notificationsCountValue", resp).text()));
if (notif.enable.messages) vals.push(parseInt($("#mercurymessagesCountValue", resp).text()));
if (notif.enable.friends) vals.push(parseInt($("#requestsCountValue", resp).text()));
if (notif.enable.notifs) vals.push(parseInt($("#notifications_jewel span._59tg", resp).text()));
if (notif.enable.messages) vals.push(parseInt($("#messages_jewel span._59tg", resp).text()));
if (notif.enable.friends) vals.push(parseInt($("#requests_jewel span._59tg", resp).text()));
return vals;
}
},
Expand Down

0 comments on commit 89a1c4d

Please sign in to comment.