Chat: pasting image from clipboard
This commit is contained in:
@@ -153,7 +153,7 @@ databap.onKeyDown = function(e)
|
||||
|
||||
function initImageUpload()
|
||||
{
|
||||
//load Uploader
|
||||
//Load Uploader
|
||||
self.tmp('uploader', new qq.FileUploader
|
||||
(
|
||||
{
|
||||
@@ -190,8 +190,19 @@ function initImageUpload()
|
||||
));
|
||||
$('.uploader_box').append($('#message_input').children());
|
||||
|
||||
//prompt file explorer
|
||||
//Prompt file explorer
|
||||
$('#upload_img').click(function(){$('#c1_file').click();});
|
||||
|
||||
//Clipboard handling
|
||||
$(function(){$.pasteimage(function(sSource)
|
||||
{
|
||||
//Parse the uri to strip out "base64"
|
||||
var sSourceSplit = sSource.split("base64,");
|
||||
var sSourceString = sSourceSplit[1];
|
||||
|
||||
//Write base64-encoded string into input field
|
||||
postMessage('/imgsrc '+sSourceString);
|
||||
});});
|
||||
}
|
||||
|
||||
function initSideBar()
|
||||
|
||||
Reference in New Issue
Block a user