Respect newlines in clipboard text
This commit is contained in:
parent
7930e94f85
commit
924a8f1350
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue