From dea8c293aa8e07b9c9cd9646f3eed2a64ffe9a4b Mon Sep 17 00:00:00 2001 From: Kamil Tomala Date: Sun, 3 Jun 2018 13:50:06 +0200 Subject: [PATCH] Fix lines starting with space getting inserted twice --- bg/monitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bg/monitor.js b/bg/monitor.js index ded20b4..9718a00 100644 --- a/bg/monitor.js +++ b/bg/monitor.js @@ -65,7 +65,7 @@ function checkClipboard() { pasteTarget.focus() document.execCommand("paste") const content = pasteTarget.textContent - if(content != previousContent && content != "") { + if(content.trim() !== previousContent.trim() && content != "") { listeningTabs.forEach(id => notifyForeground(id, content)) previousContent = content }