pass tab to contextMenuReady

This commit is contained in:
Byron Jones 2017-03-04 00:25:20 +08:00
parent e848ff3f57
commit 38dbb75edc
1 changed files with 3 additions and 3 deletions

View File

@ -231,17 +231,17 @@ function refreshBadgeAndMenu() {
chrome.storage.local.get(constantsService.disableContextMenuItemKey, function (obj) {
if (! obj[constantsService.disableContextMenuItemKey]) {
buildContextMenu(contextMenuReady);
buildContextMenu(function() { contextMenuReady(tab) });
}
else {
chrome.contextMenus.removeAll();
contextMenuReady();
contextMenuReady(tab);
}
});
});
}
function contextMenuReady() {
function contextMenuReady(tab) {
loadMenuAndUpdateBadge(tab.url, tab.id, true);
onUpdatedRan = onReplacedRan = false;
}