diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js index cbcaf8f8b..6823b4c0c 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js @@ -20,6 +20,9 @@ export class ClipboardWatcher { }); } SetClipboardText(text) { + if (text == this.LastClipboardText) { + return; + } this.PauseMonitoring = true; this.LastClipboardText = text; navigator.clipboard.writeText(text); diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map index 90d67ec0e..201486912 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js.map @@ -1 +1 @@ -{"version":3,"file":"ClipboardWatcher.js","sourceRoot":"","sources":["ClipboardWatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,OAAO,gBAAgB;IAKzB,cAAc;QACV,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC9C,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC;YAErC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;gBACnC,IAAI,IAAI,CAAC,eAAe,EAAE;oBACtB,OAAO;iBACV;gBACD,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;oBACtB,OAAO;iBACV;gBAED,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;oBAC1C,IAAI,IAAI,CAAC,iBAAiB,IAAI,OAAO,EAAE;wBACnC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC;wBACjC,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,E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IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAChC,OAAO;SACV;QAED,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IACjC,CAAC;CACJ"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts index be89553d3..97aa1f81b 100644 --- a/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts +++ b/Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts @@ -28,6 +28,10 @@ export class ClipboardWatcher { } SetClipboardText(text: string) { + if (text == this.LastClipboardText) { + return; + } + this.PauseMonitoring = true; this.LastClipboardText = text; navigator.clipboard.writeText(text);