> changeInfo.url is NOT null only when the url changes... so if the url
> remains the same changeInfo.url is null
try this code:
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
console.log(changeInfo.status,changeInfo.url);
var urlMap = [];
if (changeInfo.status == "loading" && changeInfo.url != "undefined"){
urlMap[tabId] = true;
// the tab just changed url
}
else if (urlMap[tabId] && changeInfo.status == "complete"){
urlMap[tabId] = false;
// the tab loaded the new url and changeInfo.url ==
"undefined"
}
}
On Jan 3, 6:45 pm, Tase <[email protected]> wrote:
> changeInfo.url is NOT null only when the url changes... so if the url
> remains the same changeInfo.url is null
>
> On Jan 3, 4:15 pm, im007boy <[email protected]> wrote:
>
>
>
> > I have see the onUpdate event
> > *chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {*
> > * if (changeInfo.status == 'complete') {*
> > * tabUrl = tab.url;*
> > * tabTitle = tab.title;*
> > * createLink();*
> > *}*
>
> > but when I debug,I found changeInfo only have one attribute "status",how to
> > use *changeInfo.url?Thank you.*
> > --
> > ------
> > Chrome支持迅雷、快车、旋风专用链插件http://code.google.com/p/mychrome/wiki/PrivateLinksSupport
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en.