manifest.json
{
    "name": "Omegle IP",
    "version": "0.5",
    "options_page": "options.html",
    "options_ui": {
    "page": "options.html",
    "open_in_tab": false
    },
    "background": {
    "scripts": ["background.js"],
    "persistent": true
    },
    "manifest_version": 2,
    "description": "Become a Hacker; You see the IP in the chat window",
    "permissions": ["tabs", "https://*.omegle.com/*", "storage"],
    "web_accessible_resources": ["inject.js"],
    "content_scripts" : [{
        "matches" : ["https://*.omegle.com/*"],
        "run_at": "document_end",
        "js" : ["contentscript.js"]
    }],
    "icons": {
        "16": "16.png",
        "32": "32.png",
        "48": "48.png",
        "128": "128.png"
    }
}
contentscript.js
var s = document.createElement('script');
// TODO: add "script.js" to web_accessible_resources in manifest.json
s.src = chrome.runtime.getURL('inject.js');
s.onload = function() {
    this.remove();
};
(document.head || document.documentElement).appendChild(s);
inject.js
chrome.storage.sync.get(['tracker', 'api'], function (obj) {
        tracker = obj.tracker;
        api = obj.api;
        getIp(tracker, api);
    });
function getIp(tracker, api){
    console.log(tracker + api)
}
I cant access chrome.storage.sync.get from inject.js. But I need to... Is there a way to put the chrome request to the contentscript and pass the variables to inject.js
contentscript.js basically just creates a script field and puts the inject.js into it.
the inject.js file is normally larger, but you dont need all of that
There is a post "https://stackoverflow.com/questions/9515704/use-a-content-script-to-access-the-page-context-variables-and-functions" how to implement this, i tried but i didnt achieve to get it to work...
Could you please provide a working method, to get it to work?
