Method 1.
-- use the iframe.
- Create an iframe, when pressing the save button.
- set the "src" property to a url of an image on the website.
- invoke the iframe.document.execommand. //useless, it seems the execommand is only for IE.
Method 2.
-- use a canvas
- Create a canvas
- Draw the image into the canvas.
- invoke
toDataURL
// Security Error
manifest.js:
{
"name" : "...",
"version" : "1",
"description" : ".....",
"content_scripts" : [{
"matches" : ["http://domain/p/*"],
"js" : ["i.js"],
"css" : ["i.css"]
}],
"permissions": [
"http://*.domain.com/*"
]
}
Is there any other way to handle the problem?