Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update badge on selecting another schedule

Refs #1
  • Loading branch information...
commit 3e26f8b7ec4b3cc7af596b1fe34805a93bd4a56e 1 parent 9d60bc8
@alexeykuzmin authored
Showing with 7 additions and 0 deletions.
  1. +2 −0  src/background.js
  2. +5 −0 src/popup.js
View
2  src/background.js
@@ -156,6 +156,8 @@
if ('getSchedule' === message) {
var schedule = getNextBusesList();
sendResponse(schedule);
+ } else if ('updateBadge' === message) {
+ updateBadge();
}
}
View
5 src/popup.js
@@ -17,6 +17,10 @@
return dist;
}
+ function updateBadge() {
+ chrome.runtime.sendMessage('updateBadge');
+ }
+
function refresh () {
chrome.runtime.sendMessage('getSchedule', renderSchedule);
}
@@ -52,6 +56,7 @@
document.getElementsByClassName('selected')[0].className = '';
td.className = 'selected';
window.localStorage.setItem("rasp", key);
+ updateBadge();
refresh();
});
})(td, key);
Please sign in to comment.
Something went wrong with that request. Please try again.