Skip to content

Commit

Permalink
Update ClipboardWatcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed May 29, 2020
1 parent 70ee1c2 commit 4b9aae8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Server/wwwroot/scripts/RemoteControl/ClipboardWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4b9aae8

Please sign in to comment.