This commit is contained in:
恍兮惚兮 2024-10-19 16:11:19 +08:00
parent 1e9d01e506
commit 14d846f71e

View File

@ -20,9 +20,9 @@ function splitfonttext(transwithfont) {
return transwithfont;
}
}
function clipboardsender(name, s, lpsplit) {
function clipboardsender(name, s_raw, lpsplit) {
//magic split \x02 text
s = magicsend + name + '\x03' + lpsplit.toString() + '\x02' + s;
s = magicsend + name + '\x03' + lpsplit.toString() + '\x02' + s_raw;
try {
const _clipboard = require('nw.gui').Clipboard.get();
_clipboard.set(s, 'text');
@ -35,10 +35,10 @@ function clipboardsender(name, s, lpsplit) {
transwithfont = clipboard.readText();
}
catch (err2) {
return s;
return s_raw;
}
}
if (transwithfont.length == 0) return s;
if (transwithfont.length == 0) return s_raw;
return splitfonttext(transwithfont)
}