chrome.tabs.query({
active: true,
currentWindow: true
},
function (tabs) {
chrome.tabs.captureVisibleTab(null
,{ format: "png"},
function (src) {
$('body').append("<img src='" + src + "'>" + tabs[0].url + "</img>");//appends captured image to the popup.html
}
);
});
यह कोड पॉपअप.html के शरीर में कैप्चर की गई छवि को जोड़ता है। लेकिन मैं चाहता हूं कि पॉपअप बॉडी में छवि को जोड़ने का प्रयास किया जाए, मैं chrome.tabs.create ({url: "newtab.html") का उपयोग करके नया टैब खोलना चाहता हूं और कैप्चर की गई छवि को इस newtab.html में जोड़ना चाहता हूं। ('newtab.html' पहले से ही पथ फ़ोल्डर में है)।क्रोम एक्सटेंशन- नए टैब में कैप्चर स्क्रीन शॉट खोलें
अग्रिम