mirror of
https://github.com/wassname/Mostly-Harmless.git
synced 2026-06-27 16:10:28 +08:00
Merge branch 'hotfix-1.4.1' into develop
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
background.clearCache();
|
||||
chrome.tabs.onUpdated.addListener(background.prepareBrowserAction);
|
||||
background.watchMail();
|
||||
window.setInterval(background.clearCache, settings.cacheTime * 60 * 1000);
|
||||
window.setInterval(background.clearCache, (settings.get('cacheTime') * 60 * 1000));
|
||||
reddit.getReddits();
|
||||
}
|
||||
|
||||
|
||||
+26
-7
@@ -216,13 +216,32 @@ BrowserAction.prototype.handleManualClick = function (tab) {
|
||||
* @method
|
||||
*/
|
||||
BrowserAction.prototype.setBadgeDefaults = function (tabId) {
|
||||
chrome.browserAction.setIcon({'path': '/pix/alien-fade.png', 'tabId': tabId});
|
||||
chrome.browserAction.setBadgeText({'text': '?', '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(this.handleManualClick);
|
||||
return true;
|
||||
var tabArray;
|
||||
|
||||
function setTheseBadgeDefaults (tabArray) {
|
||||
utils.forEach(tabArray, function (tab) {
|
||||
chrome.browserAction.setIcon({'path': '/pix/alien-fade.png', 'tabId': tab.id});
|
||||
chrome.browserAction.setBadgeText({'text': '?', 'tabId': tab.id});
|
||||
chrome.browserAction.setTitle({'title': 'Click to load data.', 'tabId': tab.id});
|
||||
chrome.browserAction.setBadgeBackgroundColor({'color': [192, 192, 192, 255], 'tabId': tab.id});
|
||||
chrome.browserAction.setPopup({popup: '', tabId: tab.id});
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof tabId !== 'undefined') {
|
||||
chrome.tabs.get(tabId, function (tabs) {
|
||||
tabArray = tabs;
|
||||
setTheseBadgeDefaults(tabArray);
|
||||
});
|
||||
} else {
|
||||
chrome.tabs.query({}, function (tabs) {
|
||||
tabArray = tabs;
|
||||
setTheseBadgeDefaults(tabArray);
|
||||
});
|
||||
}
|
||||
|
||||
chrome.browserAction.onClicked.addListener(this.handleManualClick);
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Mostly Harmless",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Find, vote on, save, hide, and report links on reddit; submit new links; These and more! http://kerrick.github.com/Mostly-Harmless",
|
||||
"browser_action": {
|
||||
"default_icon": "pix/alien.png",
|
||||
|
||||
Reference in New Issue
Block a user