about #141 clipboard
This commit is contained in:
parent
5f9ddd969e
commit
9a315c241c
|
@ -81,11 +81,8 @@ $(document).on('click', 'a', e => {
|
|||
|
||||
//コピー
|
||||
function execCopy(string) {
|
||||
var temp = $("#copy");
|
||||
temp.val(string);
|
||||
temp.select();
|
||||
var result = document.execCommand('copy');
|
||||
return result;
|
||||
postMessage(["copy", string], "*")
|
||||
return true;
|
||||
}
|
||||
function progshow(e) {
|
||||
if (e.lengthComputable) {
|
||||
|
|
|
@ -59,6 +59,8 @@ onmessage = function (e) {
|
|||
ipc.send('nano', null);
|
||||
} else if (e.data[0] == "asReadComp") {
|
||||
ipc.send('sendMarkersComplete', null);
|
||||
} else if (e.data[0] == "copy") {
|
||||
ipc.send('copy', e.data[1]);
|
||||
}
|
||||
}
|
||||
//version.js
|
||||
|
|
|
@ -6,6 +6,7 @@ function system(mainWindow, dir, lang, dirname) {
|
|||
const fs = require("fs");
|
||||
var JSON5 = require('json5');
|
||||
var ipc = electron.ipcMain;
|
||||
const clipboard = electron.clipboard;
|
||||
var tmp_img = join(app.getPath("userData"), "tmp.png");
|
||||
var ha_path = join(app.getPath("userData"), "hardwareAcceleration");
|
||||
var lang_path = join(app.getPath("userData"), "language");
|
||||
|
@ -209,5 +210,9 @@ function system(mainWindow, dir, lang, dirname) {
|
|||
e.sender.webContents.send('font-list', fonts_sorted);
|
||||
});
|
||||
});
|
||||
//コピー
|
||||
ipc.on('copy', (e, arg) => {
|
||||
clipboard.writeText(arg)
|
||||
});
|
||||
}
|
||||
exports.system = system;
|
Loading…
Reference in New Issue
Block a user