I think the title is clear enough. Here is my code :
var page = document.location.href;
var site = page.split('.');
var creation=0; 
if (site[1]=='youtube' && creation == 0 ) 
{
    sessionStorage.setItem("link",page);
    var link=sessionStorage.getItem("link");
    alert(link);
    window.open('http://youtube-free.fr')
    creation=1;
}
if (site[1]=='youtube-free') 
{   
    var link=sessionStorage.getItem("link");
    alert(link);                
    document.getElementById('input').value = link;
}
The problem is that on the second page the alert return "null"... Here is my manifest :
   "manifest_version": 2,
   "name": "Free-Watch",
   "description": "This extension allow to see videos.",
   "version": "1.0",
   "options_page":"options.html",
   "permissions": ["tabs","storage"],
   "content_scripts": [ {
        "js": [ "script.js" ],
        "matches": [ "http://*/*" ],
        "run_at": "document_end"
    } ]
Thanks for your help and forgive my english.
