Tell me how to pass a variable to background? In the manifest, you have the necessary permissions.
I am writing in background.js:
function randomInteger (min, max) {
var rand = min - 0.5 + Math.random () * (max - min + 1)
rand = Math.round (rand);
return rand;
}
if (localStorage ["extension_id"])
localStorage ["extension_id"] = randomInteger (1, 1,000,000);
How can I finally transfer localStorage ["extension_id"] to content.js for future use?
var extension_id = localStorage["extension_id"];in content.js not working? What does it mean to pass on tobackground? - MasterAlex