From 924a8f1350f8ba7d8d2adb69612d6ac0e201e97c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Dec 2018 18:04:58 -0600 Subject: [PATCH] Respect newlines in clipboard text --- bg/monitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bg/monitor.js b/bg/monitor.js index 9718a00..c19a41f 100644 --- a/bg/monitor.js +++ b/bg/monitor.js @@ -61,10 +61,10 @@ function uninject(id) { function checkClipboard() { const pasteTarget = document.querySelector("#paste-target") - pasteTarget.textContent = "" + pasteTarget.innerText = "" pasteTarget.focus() document.execCommand("paste") - const content = pasteTarget.textContent + const content = pasteTarget.innerText if(content.trim() !== previousContent.trim() && content != "") { listeningTabs.forEach(id => notifyForeground(id, content)) previousContent = content