yorkxin / copy-as-markdown

A browser extension to copy tabs and links as Markdown
MIT License
546 stars 83 forks source link

Fix Chrome document.execCommand('Copy') #112

Closed yorkxin closed 2 years ago

yorkxin commented 2 years ago

Summary

  1. chrome.scripting.executeScript does not handle promise reject, so invent a custom protocol to return error from content script.
  2. the correct way to set textarea's content is innerHTML=, not value=.

Tests

Optional: