Hacker News new | ask | show | jobs
by gabrielsroka 626 days ago
this seems to work almost as well (except for error handling, etc)

  javascript:navigator.clipboard.readText().then(t => open().document.write(t))
also, when writing a bookmarklet, you can add /* block comments */ and still copy/paste or drag/drop, eg:

  javascript:/* show the sum */alert(2+2)
but // comments don't work

  javascript://this won't work;alert(2+2)