Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to develop a chrome extension and i want to execute some method in the content script file from my another js file (popup.js). The documentation page says, i can execute the whole script page like this

chrome.tabs.executeScript(null, {file: "content_script.js"});

But I wrote my statements in a function and it is available in my content_script.js file. I want to call the function (and pass some parameter values to it) instead of executing the content_Script as it is. I could not find any documentation about it. Is this possible ?

My Extension = Slider changes page info.
$("#slider").bind("valuesChanged", function(e, data) {
//console.log("Something moved. min: " + data.values.min + " max: " + data.values.max);

});

What I have tried:

I have worked for 1 week. I searched web source but I don't any thing.

I want to send slider bar's value to content script. [This value will inject current page.]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900