Live data from Hacker News

Pastejacking

github.com

201–210 of 246 posts

Re: Pastejacking

#201
post #32

Earlier quoted context omitted.

To be able to remind you about your unsaved changes before you leave the page. I personally find the benefits of websites doing that to be greater than the annoyment from websites abusing this functionality. (just an extra click when its being abused, but potentially saving hours of my time when used properly)

Sure, but I ant to at least be able to blacklist sites. Yes, Jira, I'm looking at you.

This seems like a good thing for an extension to do.

Re: Pastejacking

#202
post #155

This was disabled by default in (classic) Opera (since it was a weird microsoft addition). Was surprised how many sites do this when I switched browsers. At the same time, it's better than those times when you had flash buttons to copy link. So I think it should be allowed to change clipboard on user's action (can it be detected?). But there certainly shouldn't be an event to change clipboard that is fired after the…

Yeah, I was wondering "This example is clearly broken, it won't copy at all". Glad I'm still using the best browser around!

Re: Pastejacking

#203
post #173

Earlier quoted context omitted.

What absolutely annoys me about this feature is that there are shitty ads which throw this dialog in a loop, making it virtually impossible to close them.

In which browser? Modern implementations shouldn't even make that possible.

I see it on Firefox. Now that you mention it, it seems to happen less often lately. Maybe I am looking less at shady sites or they have changed something.

Re: Pastejacking

#204
post #84

For the record you don't actually need to depend on new APIs like "document.execCommand('copy')", simply shifting focus to an off-screen textbox area when ctrl is down will do the trick in 95% of the cases, with full cross browser compatibility.

Most people copy text with right click, which would be unaffected by that. Also mobile browsers.

I don't know that most people do that, but right click and mobile seem to bypass OP's method as well.

Re: Pastejacking

#205

Earlier quoted context omitted.

At first I thought "I don't do this; it's never seemed necessary", but actually, I think I do. Years of copying to a plain text editor to strip formatting have conditioned the behavior.

Yeah, I started to copy through a text box (usually the Windows Run (Win+R) box, which isn't exactly safe now that I think of it...) to strip formatting some time ago. It's pretty much necessary whenever you want to paste anything into GMail web interface. The web is getting more ridiculous every day...

ctrl+shift+v removes formatting directly when pasting

Re: Pastejacking

#206

zsh actually detects pastes into the terminal and doesn't submit the commands on newlines. This way you see the full command and have to hit enter yourself to run it. It isn't perfect because people could try to obscure the command but in general it makes me a lot happier to paste commands into my terminal.

I must be doing something wrong, because I copy and paste multiple lines all the time into zsh (ohmyzsh on iTerm) and it will execute all but the last line (which generally doesn't have a new line on it)

Maybe your terminal doesn't indicate pasted content properly. I'm using gnome-terminal and it works flawlessly.

Re: Pastejacking

#207
post #7

This is why I always copy a command into TextEdit (or Notepad on Windows) first, and then re-copy the clean text before pasting into my terminal. While we are on the topic of copying and pasting. If the command downloads a script, make sure you download the script out-of-step via curl first, review its contents, and only then execute it. This avoids sites maliciously changing the script based on the User Agent.

I do the same but use the browser's URL bar. It's closer than opening TextEdit.

Re: Pastejacking

#208
post #9

There are many news sites that make it extremely hard to share their content on sites like HN or reddit because of these tricks. I wonder if they are actually losing traffic from it, or if their tactics work? I'm referring when you copy the text in the title of an article to try to paste it into the Title box on HN or reddit. But what you 'paste' is actually a huge paragraph about how great the news website is and ho…

Many pages in the New York Times are impossible to select text in. But I just select the text from the page source. After reading this article, I'm thinking that might be a good idea in general.

[deleted]

Re: Pastejacking

#209
post #9

There are many news sites that make it extremely hard to share their content on sites like HN or reddit because of these tricks. I wonder if they are actually losing traffic from it, or if their tactics work? I'm referring when you copy the text in the title of an article to try to paste it into the Title box on HN or reddit. But what you 'paste' is actually a huge paragraph about how great the news website is and ho…

Many pages in the New York Times are impossible to select text in. But I just select the text from the page source. After reading this article, I'm thinking that might be a good idea in general.

[deleted]

Re: Pastejacking

#210
post #7

This is why I always copy a command into TextEdit (or Notepad on Windows) first, and then re-copy the clean text before pasting into my terminal. While we are on the topic of copying and pasting. If the command downloads a script, make sure you download the script out-of-step via curl first, review its contents, and only then execute it. This avoids sites maliciously changing the script based on the User Agent.

I've started putting the preview step right inline with the curl bash instructions.

    curl -sL http://example.com/install.sh | less -eK && \
    curl -sL http://example.com/install.sh | bash
Post reply on HN