Skip to content
This repository was archived by the owner on Sep 20, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added netmonitor-state-on-1_Countbelow20.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added netmonitor-state-on-2_Countabove21.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions static/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ function updateView([timesCurrentlyDoing /*: number */, timesAlreadyDone /*: num
chrome.browserAction.setBadgeText({ text: String(timesAlreadyDone) });
if (timesCurrentlyDoing > 0) {
chrome.browserAction.setIcon({ path: 'static/on.gif' });
if(timesAlreadyDone <= 20)
chrome.browserAction.setBadgeBackgroundColor({color : [0,250,0,250]});
else
chrome.browserAction.setBadgeBackgroundColor({color : [250,0,0,250]});
} else {
chrome.browserAction.setIcon({ path: 'static/off.png' });
}
Expand Down