Index: chrome/ext/background.js |
=================================================================== |
--- a/chrome/ext/background.js |
+++ b/chrome/ext/background.js |
@@ -102,10 +102,13 @@ |
onLoading: new ext._EventTarget() |
}; |
- chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) |
+ chrome.webNavigation.onBeforeNavigate.addListener(function(details) |
{ |
- if (changeInfo.status == "loading") |
- ext.pages.onLoading._dispatch(new Page(tab)); |
+ if (details.frameId == 0) |
+ { |
+ ext._removeFromAllPageMaps(details.tabId); |
+ ext.pages.onLoading._dispatch(new Page({id: details.tabId, url: details.url})); |
+ } |
}); |
function forgetTab(tabId) |
@@ -114,12 +117,6 @@ |
delete framesOfTabs[tabId]; |
} |
- chrome.webNavigation.onBeforeNavigate.addListener(function(details) |
- { |
- if (details.frameId == 0) |
- forgetTab(details.tabId); |
- }); |
- |
chrome.tabs.onReplaced.addListener(function(addedTabId, removedTabId) |
{ |
forgetTab(removedTabId); |