News for hackers. Stuff that matters.
Re:Don't Copy-Paste from Website to Terminal by cmsj on Sunday April 07, 2013 @03:37PM (#5508368)
I was expecting it to be done with Javascript, which is, afaik, how the horrible websites that tack a URL and a "this quote came from blah" attribution, work.

I hate all of this stuff and it is greatly saddening that browser vendors are not protecting us from it. It's like the pop-up-on-click days of old and it must stop.

If I select some text and copy it, I am taking a very explicit action. I am giving the computer a very explicit instruction. There is no room for interpretation. It must not disobey me!

Re:Don't Copy-Paste from Website to Terminal by TheJH_ on Sunday April 07, 2013 @04:53PM (#5508705)
Yes, I got the idea from all the sites that do it using Javascript, but I wanted to post the example to ##security, and half of the people there probably has the browser set to "block JS by default" :D
Re:Don't Copy-Paste from Website to Terminal by fnordfnordfnord on Sunday April 07, 2013 @05:01PM (#5508742)
It'd be funnier if you invoke 'sl' in their shell.
Re:Don't Copy-Paste from Website to Terminal by TheJH_ on Sunday April 07, 2013 @05:09PM (#5508778)
Definitely, I didn't even know that command :D - but I had to `apt-get install sl` on my machine first. Maybe just do a telnet to a nonstandard port on my server and then send special characters to do the animation? That could work...
Re:Don't Copy-Paste from Website to Terminal by fnordfnordfnord on Sunday April 07, 2013 @06:41PM (#5509060)
Yeah, I didn't consider the fact that not everyone has sl on their machine.
Re:Don't Copy-Paste from Website to Terminal by qu4z-2 on Sunday April 07, 2013 @07:14PM (#5509146)
It is a sad world we live in where some people don't have sl installed.
Re:Don't Copy-Paste from Website to Terminal by dllthomas on Sunday April 07, 2013 @07:53PM (#5509270)
sl is horrible - I don't need to waste however many seconds just because I mistyped something.
Re:Don't Copy-Paste from Website to Terminal by cmsj on Monday April 08, 2013 @04:32AM (#5510575)
I always install sl because it helps me. If I'm frustrated from typing too quickly/angrily to even get "ls" right, the little train breaks me out of my fugue state and I have to laugh and shout "choo choo!" in the office :D
Re:Don't Copy-Paste from Website to Terminal by theon144 on Sunday April 07, 2013 @04:39PM (#5508659)
>If I select some text and copy it, I am taking a very explicit action. I am giving the computer a very explicit instruction. There is no room for interpretation. It must not disobey me!

From the point of view of the browser, it very explicitly does what you told it to, without interpretation, obediently. The problem is that yours and the browser's opinions differ on what you intended to do.

Re:Don't Copy-Paste from Website to Terminal by cmsj on Monday April 08, 2013 @04:30AM (#5510573)
Then it needs to adjust its worldview to match mine. It showed me some text, I selected the text it showed me. If its simple layout engine thinks I saw some text that was rendered hundreds of pixels outside the viewable area, that is its bug, not mine.
Re:Don't Copy-Paste from Website to Terminal by peeters on Monday April 08, 2013 @11:17AM (#5512193)
It's infeasible for the browser to know "what you see" in the general case. What if the text was in position, but very small and almost the same color as the background? Does the browser need to know if you're red-green colour blind? If you're farsighted?
Re:Don't Copy-Paste from Website to Terminal by ttrreeww on Monday April 08, 2013 @02:45PM (#5513642)
Yes
Re:Don't Copy-Paste from Website to Terminal by eli on Sunday April 07, 2013 @03:42PM (#5508402)
That's a pretty narrow view. Sometimes I want a site to capture selections or right-click (think: WYSIWYG editor widget). Your beef is with the site owners who put that obnoxious stuff on their site, not with the browser that displays it. There is no limit to the number of ways a site owner can do dumb and annoying things to their readers.
Re:Don't Copy-Paste from Website to Terminal by pekk on Sunday April 07, 2013 @04:10PM (#5508535)
Since site owners are often not trustworthy on petty issues like this, it would be nice if browsers would make an effort to protect from the more obvious forms of malice rather than telling the user that it's their fault if anything happens
Re:Don't Copy-Paste from Website to Terminal by gbog on Monday April 08, 2013 @03:38AM (#5510428)
> capture selections or right-click (think: WYSIWYG editor widget)

Why, no, not the same.

I think it is ok for a webapp to be aware that I selected some text, and which text, so a further click on "boldface" would have a context.

But it is not ok for a webapp to interfere with the text selection itself.

For instance, well-intentionned chrome always add "http:// when I select the url. It gets in my way very often and it is not what I intended: I did select google.com with my mouse very carefully, I do not want Chrome to be clever and add "http://. By the way, this issues comes from the excessively minimal UI: Chrome should not hide "http:// in the url bar, point-barre.

I do not use Evernote because it messes with my selections.

I have to use Trello at work but this bully don't even let me select a card title.

And the list goes...

Re:Don't Copy-Paste from Website to Terminal by IanCal on Monday April 08, 2013 @06:59AM (#5510981)
"I have to use Trello at work but this bully don't even let me select a card title."

It does if the card is open, are you referring to it assuming you're trying to drag a card on the board view? I'd rather have that than sometimes it drags, sometimes it selects the text.

Re:Don't Copy-Paste from Website to Terminal by gbog on Monday April 08, 2013 @08:03PM (#5515570)
I mean that when I click on a title Trello assumes I want to edit it. It's that too hard to have a light gray edit icon for that purpose?
Re:Don't Copy-Paste from Website to Terminal by IanCal on Wednesday April 10, 2013 @10:58AM (#5525520)
I can't double/triple click but clicking and dragging works just fine for me.
Re:Don't Copy-Paste from Website to Terminal by cmsj on Monday April 08, 2013 @04:29AM (#5510567)
No my beef is with my web browsers for allowing obnoxious things to happen. They take stands on things like blocking popups, why not clipboard interference and context menu blocking?
Re:Don't Copy-Paste from Website to Terminal by Skalman on Monday April 08, 2013 @04:43AM (#5510617)
At least in Firefox you can prevent sites from blocking the context menu. Preferences -> Content -> [Enable JavaScript] Advanced... -> Disable or replace context menus
Re:Don't Copy-Paste from Website to Terminal by Aramgutang on Sunday April 07, 2013 @10:46PM (#5509729)
If you're using Firefox, you can prevent this kind of behaviour by going into about:config, and setting the dom.event.clipboardevents.enabled flag to false.
Re:Don't Copy-Paste from Website to Terminal by limmeau on Monday April 08, 2013 @03:30AM (#5510409)
Would that look at the screen layout to remove a span that is positioned too far to the left? Or just disable JS control over copy-paste, which doesn't solve this problem?
Re:Don't Copy-Paste from Website to Terminal by beedogs on Sunday April 07, 2013 @08:45PM (#5509415)
FYI, most of that bullshit "Read More: <URL>" injection garbage can be blocked by adding "tynt.com" to your favorite adblock extension. I believe it's already in ghostery, just not enabled by default.

If ever there were a company that just needed to be nuked from orbit, it's tynt.

Re:Don't Copy-Paste from Website to Terminal by johnbm on Sunday April 07, 2013 @06:57PM (#5509097)
There is a way to fix it: don't select text in document order, but only in visual order. Apple does something like this in their PDF reader. This would probably break things people do today, and there would be whining.