Hacker News new | ask | show | jobs
by cutchin 2307 days ago
This happened to me recently and it was pretty embarassing - I copied a two paragraph snippet from a psychology paper and the website put an ad for CBD oil in my clipboard above the paragraphs.

The segment I copied was just long enough that it overflowed my chat window so I had no idea the insertion was even there and I sent it as-is.

The recipient called me about two minutes later and said "hey, I think you've been hacked - you just sent me a CBD oil advertisement."

So yeah, I'd love to see user agents address this. If I push a copy button (like github's clone repo button) then fine, I'm at the mercy of their javascript. But if I copy via ctrl-C or a right click menu, it should not not let the page interfere.

2 comments

That's kind of hilarious actually.

This highlights the tension between the document-web and the app-web. What if the page is an image editor, word processor, spreadsheet? These app-web pages need custom logic for copy and paste. Unfortunately, bad actors (like what you found) ensure browsers cannot implement this stuff properly, because every feature is now a way to shove a new ad in.

>"the tension between the document-web and the app-web"

This is a huge factor in debates about things like the merits of CSS-in-JS, or the tradeoffs in "JAMstack" architecture. Pick any polarizing facet of web development and odds are you'll find this tension at the heart of the opposing perspectives.

And it's not black/white either. It's a spectrum. There are plain HTML documents on one hand, and highly dynamic applications like Figma or Google Sheets on the other hand, but in between are interactive documents and anything you can think of.

So these features are here to stay.

That just demonstrates that ads are not web-specific, but actor-specific, so that adblock technology should work at the OS level^, like firewall and antivirus. This would shift the problem to bad adblock vendors, but at least we could have few okay-today options to choose from.

^ not gonna happen for most platforms, as it’s walled gardens all the way down, but hopefully some day it will become obvious that adcrap tech stack is a wrong foundation to make computers and their economy.

It is possible to allow websites to implement custom logic within them without letting them mess with copy & paste going out of these sites.
< I'd love to see user agents address this>

Use Firefox, go to reader mode, copy/pasta whatever you want without worries