google chrome extension - How to follow a redirect in Javascript? -


i'm working on chrome extension has conditional context menu. menu should appear if right click on link "youtube.com" hostname.

it works of time, except when using social media facebook or twitter. facebook , twitter redirect internally, causing code not recognize url, , not display context menu. here code looks like:

var contexts = ["selection","frame","page","editable", "link", "video"]; var acceptedurls = ["*://*.youtube.com/*", "*://youtube.com/*","*://*.soundcloud.com/*","*://soundcloud.com/*"]; var title = "add queue"; chrome.contextmenus.create({"title": title, "contexts": contexts, "documenturlpatterns": acceptedurls}); 

is there way figure out whether url redirect within chrome extension?


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -