TheDesk Miho (ver.13)

This commit is contained in:
cutls
2018-02-18 01:44:03 +09:00
parent 10367c93c7
commit 357f417560
16 changed files with 182 additions and 73 deletions

View File

@@ -65,3 +65,22 @@
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
});
};
//コピー
function execCopy(string){
var temp = document.createElement('div');
temp.appendChild(document.createElement('pre')).textContent = string;
var s = temp.style;
s.position = 'fixed';
s.left = '-100%';
document.body.appendChild(temp);
document.getSelection().selectAllChildren(temp);
var result = document.execCommand('copy');
document.body.removeChild(temp);
// true なら実行できている falseなら失敗か対応していないか
return result;
}