From 14d846f71efbbcf71d0c9cdcb70c368b1915e31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:11:19 +0800 Subject: [PATCH] ... --- LunaHook/resource/lunajspatch.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/LunaHook/resource/lunajspatch.js b/LunaHook/resource/lunajspatch.js index a56a30a..44fb158 100644 --- a/LunaHook/resource/lunajspatch.js +++ b/LunaHook/resource/lunajspatch.js @@ -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) } @@ -78,7 +78,7 @@ function rpgmakerhook() { } Bitmap.prototype.collectstring = { 2: '', 5: '', 6: '' }; setInterval(function () { - for(lpsplit in Bitmap.prototype.collectstring){ + for (lpsplit in Bitmap.prototype.collectstring) { if (Bitmap.prototype.collectstring[lpsplit].length) { clipboardsender_only_send('rpgmakermv', Bitmap.prototype.collectstring[lpsplit], lpsplit) Bitmap.prototype.collectstring[lpsplit] = ''