I have the following question.
I've written chrome extension and its loaded to browser. Now I want to call one JavaScript function from any page outside the extension scripts (for example: call from server on localhost);
For instance I have that Script in extension:
var jqr= jQuery.noConflict(true);
(function($) {
var cls= { ... };
cls.init = function() {
var listener = function(event) {
}
}
var anotherCall= function() {...}
})(jqr);
now I want to call that function from any page outside the extension.
<body>
<script>
function foo(){
listener({data:"value"});
anotherCall()
}
</script>
<button onclick="foo()">Click me</button>
</body>
it does not work, listener and anotherCall is undefined . How can I do that?