4 ms·
Sorry, this site has some javascript that copies and pastes the entire article when you try and copy and paste a few sentences. Didn't catch this before submit
by mikek 11y ago
Sorry, this site has some javascript that copies and pastes the entire article when you try and copy and paste a few sentences. Didn't catch this before submitting on mobile.
- jessaustin 11y agoYou can still edit or delete your post.
- ghurtado 11y agoEh? That is not something a webpage can do, for all sorts of reasons. HN can only paste what you have copied before, so I'm afraid this is most likely a case of user error.
- stordoff 11y agoI agree that this is probably just an error, but I have seen sites that manipulate copies before (usually to add "Read more at URL" or something)
- ghurtado 11y agoYou're right, I didn't explain myself correctly. What I meant to say is that Javascript from one site is forbidden by default from operating on the contents of another site. So if you didn't copy the text from site A in the first place, it is not possible (at a basic security level) for site B code to access the text from site A which never made it into the clipboard.
- ghurtado 11y agoIt would be much more helpful for everyone if you explained where you think I'm incorrect, rather than mindless downvoting. Having worked professionally with Javascript for almost 20 years, I would hate to miss an opportunity to learn something more about it.
- pharrington 11y agoJavascript cant edit the clipboard, but it can change the contents of the region youre selecting.
- ghurtado 11y agoWithin the same site, sure. Cross-site, it cannot.
- drothlis 11y agoPresumably by "this site" mikek meant the site hosting the article.
- deleted 11y ago[deleted]