mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Moving back to trunk!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ad265b2c54
commit
8d458998a1
332 changed files with 17647 additions and 9466 deletions
|
@ -0,0 +1,29 @@
|
|||
function sendCaptureToGreenshot(dataURL) {
|
||||
window.console.info('Sending data...');
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "POST",
|
||||
contentType: "image/png;base64",
|
||||
dataType: "text",
|
||||
processData: false,
|
||||
data: dataURL,
|
||||
url: 'http://localhost:11234',
|
||||
success : function (text) {
|
||||
window.console.info('Got: ' + text);
|
||||
},
|
||||
error : function () {
|
||||
alert("Couldn't send capture, please check if Greenshot is running!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function capture() {
|
||||
window.console.info('Starting capture');
|
||||
try {
|
||||
chrome.tabs.captureVisibleTab(null, {format:'png'}, captureTaken);
|
||||
} catch(exception) {
|
||||
alert( exception.toString());
|
||||
}
|
||||
}
|
||||
|
||||
chrome.browserAction.onClicked.addListener(function(tab) {capture();});
|
Loading…
Add table
Add a link
Reference in a new issue