mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 20:48:42 +01:00
fix #821
This commit is contained in:
parent
57a5857c1f
commit
8045a0d403
@ -207,7 +207,7 @@ $(document).ready(function () {
|
||||
|
||||
// 剪贴板复制图片
|
||||
textarea.pastableTextarea().on('pasteImage', function (e, data) {
|
||||
name = data.name.replace(/[\(\)\[\]\*#!]/g, '');
|
||||
var name = data.name ? data.name.replace(/[\(\)\[\]\*#!]/g, '') : (new Date()).toISOString().replace(/\..+$/, '');
|
||||
if (!name.match(/\.[a-z0-9]{2,}$/i)) {
|
||||
var ext = data.blob.type.split('/').pop();
|
||||
name += '.' + ext;
|
||||
|
Loading…
x
Reference in New Issue
Block a user