hi, I'm trying to build a script, and I need to access localStorage from my content script.
script.js:
That points to a PHP script on my server, and it uses the HTTP referrer to extract the ID of a page to mail, and uses addr to decide where to send it. The problem is, the mail variable is undefined. So I've been trying to find out how to access local storage, by searching on google, and read you have to use a sendRequest on my script.js and onRequest on my background.html, so I've tried copying and pasting from what worked for other people, but it just won't work for me!Code:var MAIL = localStorage.EMAIL; var flags = document.getElementById('flags'); if(flags){ document.getElementById('flags').innerHTML = prev + "<a href='http://mvmacd.comlu.com/craigslist.php?user&addr="+MAIL+"'>Email this</a>" }
if you can give me a simple and straight forward example, I'd appreciate it. Thanks,
~Matt


LinkBack URL
About LinkBacks




Reply With Quote
