I need to be able to read a variable set on a google chrome extension from any web page.

For example on a firefox extension I am doing this :

XPCNativeWrapper.unwrap(contentWindow).myExtensionName_varName = "value";

Then on any web page if I do alert(myExtensionName_varName); I get the correct value.

How could I achieve the same thing on a chrome extension?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top