Below is my manifest.json:
{
"name": "My Extension Name",
"version": "1.9.1",
"manifest_version": 2,
"icons": { "16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png" },
"homepage_url": "https://www.mysite.com",
"description": "My Extension Description",
"permissions": ["http://www.example.com/*"],
"content_scripts" : [{
"matches" : [ "http://www.example.com/*"],
"js" : ["contentscript.js"],
"run_at" : "document_end"
}],
"web_accessible_resources": ["script.js"]
}
My contentscript.js is:
var s = document.createElement('script');
s.src = chrome.extension.getURL("script.js");
(document.head||document.documentElement).appendChild(s);
script.js:
$.post("https://www.mysite.com/app/myfolder/", function(html){
$("body").prepend(html);
});
I would like to access the DOM in http://www.example.com/. There is a form in http://www.example.com/. when the submit button of the form is clicked, iw ould like to get the post values in www.mysite.com. How to achieve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…