yorkxin / copy-as-markdown

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

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

Closed yorkxin closed 1 year ago

yorkxin commented 1 year 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: