User can now click on the browser action to reload data.

This commit is contained in:
Kerrick Long
2011-07-15 10:24:23 -05:00
parent adb84580fb
commit b7543ffccc
+4 -1
View File
@@ -148,9 +148,12 @@ function BrowserAction() {
*/
BrowserAction.prototype.setBadgeDefaults = function (tabId) {
chrome.browserAction.setBadgeText({'text': '?', 'tabId': tabId});
chrome.browserAction.setTitle({'title': 'Refresh the page to load data.', 'tabId': tabId});
chrome.browserAction.setTitle({'title': 'Click to load data.', 'tabId': tabId});
chrome.browserAction.setBadgeBackgroundColor({'color': [192, 192, 192, 255], 'tabId': tabId});
chrome.browserAction.setPopup({popup: '', tabId: tabId});
chrome.browserAction.onClicked.addListener(function(tab) {
reddit.getInfo(tab.url, tab.id);
});
return true;
};