So, I'm trying to access Google Chrome extensions.
I already made a 50% script, but I settled on one step:
How to load an external website - for example: www.mysite.com/page.php - in popup.html?
I only had success when I used iFrame, but, it's ugly and insecure ... :(
Is there a way to do this using jquery (ajax)?
Thanks in advance.
So, here is how my manifest.json is:
{ "manifest_version": 2, "name": "XCLickF", "description": "X file", "version": "1.0", "background": { "scripts": ["jquery-1.9.1.min.js","background.js"] }, "permissions": [ "http://*/*", "https://*/*" ], "browser_action": { "default_icon": "icon.png", "default_title": "XMail", "default_popup": "popup.html" } }
And like my background.js:
function poll() { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = handleStateChange; // Implemented elsewhere. xhr.open("GET", 'http://disqus.com/', false); xhr.send(null); console.log(xhr.responseText); } function handleStateChange() { if (this.readyState == 4) { var resp = JSON.parse(this.responseText); updateUi(resp); } } function updateUi(json) { console.log("JSON: ", json); }
source share