20 ms·
Don't touch my clipboard
- DavidVoid 7y agoOn a related note, I find it interesting how modern US-ANSI layout keyboards (even the International version [1]) still has such a limited set of characters. We have ¼, ½, and ¾, but not en (–) and em (—) dashes; and I get that (') and (") are leftovers from typewriters and ASCII, but wouldn't it be nice to have proper 6-9 (‘…’) and 66-99 (“…”) quotation marks? Then again, you often see Europeans online misusing acute (´) and grave ( `) accents as apostrophes (writing don´t or don`t, instead of don't or don’t). So perhaps the availability of more similar looking keys would just lead to even more misuse? [1]: https://upload.wikimedia.org/wikipedia/commons/2/22/KB_US-International.svg https://upload.wikimedia.org/wikipedia/commons/2/22/KB_US-In...
- JdeBP 7y agoSee https://news.ycombinator.com/item?id=22357897 https://news.ycombinator.com/item?id=22357897 .
- deleted 7y ago[deleted]
- generalpass 7y agoFirefox makes life easier: Ctrl+Alt+R Also, uMatrix with js disabled by default works well, too.
- nomadrat 7y agoI used to work for a big ad-tech company(the company is sold and closed now). I was a guy who developed a tool with this functionality. As a publisher, you can add a text with a link(plus tracking code) to every copied peace of text from your webpage. Something like: "Read more at: https://example.com/my-article/#<tracking_code>" https://example.com/my-article/#<tracking_code>" It's not about copyright. As a website owner, you can disable this behavior, but by default, it was enabled. The main purpose of this functionality was to track shares(for example if you copy text and send it to your friend in skype). As i remember it was one of the most popular & important features in the whole toolkit. In a nutshell, it's about 200 lines of battle-tested javascript-code that worked perfectly fine in almost any browser(dunno about now it was around 3 years ago). Personally, i hate this behavior.
- zzo38computer 7y agoI mostly do not enable document scripts. But, does any browser have a setting to disable the ability for document scripts to affect selections? (They also mention smooth scrolling. I don't like that either, nor replacing standard widgets with their own or adding additional worthless animations.)
- mangatmodi 7y agoThere is a special place in my hatebook for websites which disable copy, this website just earned the top place
- cutchin 7y agoThis 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.
- millstone 7y agoThat'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.
- chrisweekly 7y ago>"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.
- frosted-flakes 7y agoAnd 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.
- clarry 7y agoIt is possible to allow websites to implement custom logic within them without letting them mess with copy & paste going out of these sites.
- skrebbel 7y agoJust want to share that there's also good reasons for employing this technique. Eg if you select text in Slack that has emojis or formatting, it tries to put plain-text into the clipboard that would produce said emojis and formatting when pasted back into Slack. This is great, and every chat app does does formatted stuff should do this. I'd hate it if browser vendors would attempt to block this and as a result, break that kind of functionality too.
- brianpan 7y agoExcept that your example is only “great” because Slack is reimplementing text input- another thing that maybe should just be handled by the system. Is it great that Slack also has its own autocorrect and doesn’t know about the system autocorrect?
- skrebbel 7y agoI'm not sure how autocorrect is related. How would you let text input with emojis and formatting and code blocks be "handled by the system"? I agree that on most platforms, emojis are a solved problem (although the UX could be better), but the rest isn't. Sure, like all chat apps, what Slack does is a workaround around system limitations. But the limitations are there, and they need the "copy" event to make their hack work end to end.
- maple3142 7y ago> Except that your example is only “great” because Slack is reimplementing text input- another thing that maybe should just be handled by the system. But this won't allow you to have a consistent emoji across platforms, neither do server-specific emoji. Besides, I found typing :emojiname: is much easier than finding emoji in emoji keyboard.
- ubermonkey 7y agoThat's just needless hackery from Slack, though. I should be able to decide if I want to allow apps to mess with my clipboard, and the default should be "no".
- brobot182 7y agoIs there a chrome plugin that prevents this?
- gruez 7y agoas mentioned by others, on firefox you can set dom.event.clipboardevents.enabled to false in about:config, which prevents sites from being notified when you tried to copy something.
- sdtsui 7y agoSame! I'd be interested in a chrome plugin that prevents this.
- totetsu 7y agoI just modified a userscript to disable this. (running with tampermonkey) https://stackoverflow.com/a/26160412 https://stackoverflow.com/a/26160412 I changed the document.addEventListener to 'copy'. It seems to stop the site from running its own code. [edit] This seems to be a more fully functioned script. https://greasyfork.org/en/scripts/14146-%E7%BD%91%E9%A1%B5%E9%99%90%E5%88%B6%E8%A7%A3%E9%99%A4 https://greasyfork.org/en/scripts/14146-%E7%BD%91%E9%A1%B5%E...
- SanchoPanda 7y agoMay I ask how many plugins you run at any time on average?
- analog31 7y agoIn lieu of a plugin, I always paste into a plain text editor and copy the stuff I actually want from there. I've always done this, not because of dark-patterny stuff, but just fonts and having bad aim with my cursor when I copy.
- jeffparsons 7y agoHow about a Chrome plugin to disable Chrome's _own_ what-you-see-is-not-what-you-get behavior? I occasionally find it convenient to select hostnames out of a URL in the address bar and paste them into a terminal. Chrome "helpfully" prepends noise to the text you actually copied ("scheme://"), which makes this a PITA.
- SanchoPanda 7y agoMy favorite demo on this subject: https://github.com/dxa4481/Pastejacking https://github.com/dxa4481/Pastejacking
- sigotirandolas 7y agoActually my terminal emulator (xfce4-terminal) added a preview + confirmation dialog a few months ago for copy-pastes including newlines (i.e. which will execute a command instantly). I thought that it was to avoid accidental mistakes, but it makes even more sense that it is to avoid this.
- oefrha 7y ago> copy-pastes including newlines (i.e. which will execute a command instantly) You should enable bracketed paste mode in your shell. IMO it’s much better UX than a confirmation dialog. https://cirw.in/blog/bracketed-paste https://cirw.in/blog/bracketed-paste
- sigotirandolas 7y agoCuriously, I never heard of this despite being a Linux user for quite a long time. I'll give it a try.
- danso 7y agoThis hijacking “feature” that’s been a part of news and other proprietary content sites for more than a decade now: https://moz.com/ugc/copymagicpaste-a-script-and-easytouseguide-to-customize-the-copyevent-on-your-website https://moz.com/ugc/copymagicpaste-a-script-and-easytousegui... Anecdotally speaking, I’ve seen it a lot less these days; mostly, I see it when copy-pasting from my Kindle app. I’ve rarely ever seen it for a site this general-purpose (and trivial) though
- saagarjha 7y ago> You can set up a minimum length, so not every word copied will be modified by the following, preventing a negative user experience when using your site. You know what would prevent a negative user experience? Not adding things to my clipboard that I don't want. (Thankfully, that site didn't seem to.)
- smacktoward 7y agoIt’s been around for so long a clipboard-jacking-as-a-service company, Tynt (https://www.crunchbase.com/organization/tynt https://www.crunchbase.com/organization/tynt), launched, lived and exited. If telling people not to do this was going to be enough to solve the problem, we wouldn’t still be talking about it. The browser vendors really need to shut it off once and for all.
- saagarjha 7y agoAnd they have 100-250 employees?!
- sigotirandolas 7y ago
- jawns 7y agoThere used to be a time when we could hope that browsers would put users first and disable dark patterns like these. Now, there are so many advertisers that use Tynt and related services to muck with copy/paste that it wouldn't surprise me if the major browsers are incentivized to leave this alone and let users suffer.
- adtac 7y agoAnd when was that? The 2000-2010 era where everything you clicked added a layer to your Internet Explorer addons list? Or the 2010-2014 era where everything required Java and Flash enabled by default, ridden with zero day exploits? Or the 2014-2016 era with cryptominers, trackers and trivial fingerprinting techniques allowed to exist easily? Or the 2016-current era with heavy Javascript applications which train the user to expect some interactivity with every action (and therefore encourage devs to do stuff like in this post)?
- jawns 7y agoI was thinking about the removal of the <blink> tag, removed in Firefox 23 Ah, those were the days :)
- smt88 7y ago> disable dark patterns like these Clipboard access isn't guaranteed to be a dark pattern, though. It's an API that the browser supports. I dislike clipboard access 99% of the time, but it's actually useful in a few UIs (like copying keys in AWS). Should it really be up to the browser to determine that an API is always a dark pattern? Honestly, most of the worst dark patterns of the web are enabled by regular <div>, <button>, and <img> elements -- which is to say, they're not something the browser can unilaterally decide are "evil".
- cortesoft 7y agoIs it really useful in AWS? Why is it needed?
- adtac 7y agoI chuckled when I saw the copyright. What exactly are they copyrighting? Lorem ipsum? The bloody emdash itself? Even I exercised more caution when I was 12 and learning HTML, arbitrarily applying copyright to things I didn't own.
- prestemon 7y agoMost importantly, https://emdash.fan/ https://emdash.fan/ is the best emdash site on the internet.
- tkgally 7y agoMy go-to site for copying special symbols is Wikipedia, which is, of course, well-behaved: Dashes https://en.wikipedia.org/wiki/Dash https://en.wikipedia.org/wiki/Dash Diacritics https://en.wikipedia.org/wiki/Diacritic https://en.wikipedia.org/wiki/Diacritic Precomposed Latin characters https://en.wikipedia.org/wiki/List_of_precomposed_Latin_characters_in_Unicode https://en.wikipedia.org/wiki/List_of_precomposed_Latin_char... Currency symbols https://en.wikipedia.org/wiki/Currency_symbol https://en.wikipedia.org/wiki/Currency_symbol Japanese typographic symbols https://en.wikipedia.org/wiki/List_of_Japanese_typographic_symbols https://en.wikipedia.org/wiki/List_of_Japanese_typographic_s... etc.
- amanzi 7y agoMS Word will autocorrect two hyphens into either an en dash or an em dash based on what it believes you were trying to type. So this: "em--dash" becomes this: "em—dash" while this: "en -- dash" becomes this: "en – dash"
- joegahona 7y agoEn dashes are for ranges and sometimes for compound modifiers, like "billiard-ball–size hail" or "New York City–based attorney." Not sure who advised MS Word to turn two dashes into an en dash, ever, but it's not correct. Whether an em dash has spaces around it is a matter of style.
- amanzi 7y agoWord will only change it if you've used two hyphens, it won't autocorrect the examples you have.
- distant_hat 7y ago
- hoten 7y agoI had the exact same reaction to this site a few days ago. https://twitter.com/cjamcl/status/1228501692682924032 https://twitter.com/cjamcl/status/1228501692682924032
- smichel17 7y agoThe wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.
- wink 7y agoWhat about the X clipboard, e.g. just selecting text and then being able to paste with middleclick - did you check that as well? I suppose it should circumvent that?
- bzbarsky 7y agoThere's the "dom.event.clipboardevents.enabled" preference, which you can set to false in about:config. I don't know whether that's planned to stick around or whether it was added when the clipboard event support was still experimental and will be removed at some point. But I suspect the former, for precisely the reasons in this thread. Note that disabling these events will likely break "smart" copy/paste in things like Google Sheets, which is one reason it's not disabled by default....
- zzo38computer 7y agoOK, it looks like I have already disabled that (although I forgot about it until I looked now).
- deleted 7y ago[deleted]
- franga2000 7y agoI suspect a complex WYSIWYG editor like Google Docs benefits from this feature since the selection behaviour is heavily customised (and it has to be in order to support most of its features). The browser can't comprehend most of the things you might be selecting and copying from such a document, so it makes sense to replace the clipboard with a more accurate representation.
- slimsag 7y agoReally, the web just gets more and more vile towards users. Sure, highly technical folk are capable of working around this all -- but the vast majority of people do not have a browser that is _working for them_: - You have little to no control over what content you are seeing. Instead, it is chosen for you. - A large number of videos (not even including movies and shows) are geographically blocked. You cannot access them. - Developers are actively trying to prevent: Saving images[1][2][3], selecting text[4][5], browsing on a mobile phone[6][7], and a whole slew of other normal user actions I don't care to cite: preventing users from going back, manipulating their browser history, asking for notification and geolocation permissions, displaying full-screen modals that block content access, scroll-jacking, click-jacking, and more. But don't worry! It's not all doom and gloom, websites like Reddit, Instagram, Facebook, banks, and more are heavily pushing their users away from the web to mobile applications where you have ZERO choice. And we're going to maintain this backwards-compatible stack of completely volatile pieces of anti-patterns until that migration to "apps" is complete, and you can no longer distinguish between the app on your phone monitoring everything you do or the site running 5 different layers of VMs and doing the same -- albeit a bit slower. [1] https://security.stackexchange.com/questions/122922/discouraging-users-from-copying-images-off-a-website https://security.stackexchange.com/questions/122922/discoura... [2] https://stackoverflow.com/questions/21110130/protect-image-download/48855148 https://stackoverflow.com/questions/21110130/protect-image-d... [3] https://stackoverflow.com/questions/35897974/how-to-prevent-image-from-copying https://stackoverflow.com/questions/35897974/how-to-prevent-... [4] https://stackoverflow.com/questions/16805684/javascript-disable-text-select https://stackoverflow.com/questions/16805684/javascript-disa... [5] https://stackoverflow.com/questions/8365272/disable-copying-on-a-website https://stackoverflow.com/questions/8365272/disable-copying-... [6] https://stackoverflow.com/questions/10177456/how-to-disable-access-to-website-for-mobile https://stackoverflow.com/questions/10177456/how-to-disable-... [7] https://stackoverflow.com/questions/22618724/how-to-disable-my-website-from-being-viewed-on-mobile-devices https://stackoverflow.com/questions/22618724/how-to-disable-...
- mopsi 7y agoCheer up. Flash was once as ubiquitous as JS is now. :)
- deleted 7y ago
- Nicksil 7y agoI agree and share the frustration. A stock Apple application "Books" does something similar as well. When copying text -- using keyboard shortcut or the context menu rendered as soon as you lift your mouse (another tragedy) -- your clipboard will look something like the following (2 lines): “<what you actually wanted to copy>” Excerpt From: <Author>. “<Title>.” Apple Books. That gets written to your clipboard; quotes and everything.
- roryokane 7y agoIn case you haven’t seen the discussion in the sibling comment tree https://news.ycombinator.com/item?id=22353121 https://news.ycombinator.com/item?id=22353121, there are solutions to this behavior of Books. Particularly, see my answer https://apple.stackexchange.com/a/382603/21473 https://apple.stackexchange.com/a/382603/21473 to the question ‘Don't want iBooks to always paste the “Excerpt From” of what I have copied’.
- jerrysievert 7y agoas does the kindle app. it's come in handy once for me (in a comment to a hn post, ironically), but usually it's a nuisance.
- eitland 7y agoI loved it when I used Windows and OneNote (it would add metadata when I pasted to OneNote but not otherwise.)
- iudqnolq 7y agoI think the windows clipboard can hold that as metadata. OneNote had a setting that I could enable so that when I pasted from Edge into OneNote the url was appended, but the url wouldn't show up if I pasted into another rich text editor like Word (or OneNote without the setting enabled). Using org mode now, and there's probably a way to do it with emacs lisp, but... I'll never get around to it.
- 7y ago
- abrax3141 7y agoI wish clipboards worked like emacs yank buffers. Then you wouldn't have this problem.
- mopsi 7y agoIt's not just an annoyance. Think of copying shell commands...
- actionowl 7y agoThe last sentence of the article is the absolute best: > Ironically, a little reverse searching reveals that this code was copied verbatim without attribution from this StackOverflow post (see “Manipulating the selection” from the top answer). Maybe copy/paste isn’t so bad?
- bunchOfCucks 7y agoSomeone discovered the vanilla js framework from way back when!
- thought_alarm 7y agoI've been using a simple Javascript whitelist/blocker for the last 4 years or so (a dead-simple Safari content blocker for iOS and Mac I wrote myself; syncs over iCloud just to give me something to do) and I honestly don't know how anyone can stand the wide-open web without something similar. Using the web with free Javascript privileges is an utterly appalling experience. I can't stand it for more than 5 seconds.
- 0zymandiass 7y agoI don't suppose you've open sourced that somewhere? My work has switched to iPhones, and I really miss NoScript when using Safari
- codazoda 7y agoI recently switched back to Chrome on mobile because I NEED the ability to blacklist JavaScript from abusive sites. Hacker News links, in particular, are infuriating without it. I haven't found a way to do this in any of the Firefox versions available for Android. My block list is mostly well known news sites.
- SanchoPanda 7y agoUblock origin works on mobile, and you can reuse your settings from desktop.
- sterwill 7y agouBlock Origin even works on Firefox Preview Nightly, which I'm really loving. Way faster than normal Firefox on my old Nexus 6. Makes the phone feel several years younger.
- stefco_ 7y agoIt's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note that the quotes around your actual selection aren't even the ASCII quote character; you get horrid unicode quotes that are easy to miss if you're just trying to run a bit of code in your REPL. This isn't even a DRM ebook, so it's not like Apple is being compelled by contract to insert a citation. It's awful, user-hostile behavior that removes one of the main advantages of digital-vs-hardcopy coding books (copy/paste), and AFAIK there's no config that lets you disable it.
- jsmith99 7y agoOn Windows, clipboard items have hidden tags added when they are copied, so the program you are pasting into can make these decisions, instead of the program you are copying from needing to manipulate the copied text. For example, if I copied that code from a Web page and pasted it into the console it would paste just the code, but if I pasted it into Onenote it would check the tags and add a line underneath with the url the code was copied from. https://devblogs.microsoft.com/oldnewthing/20140721-00/?p=453 https://devblogs.microsoft.com/oldnewthing/20140721-00/?p=45...
- roryokane 7y agoDon’t despair, there are workarounds for this. See the many answers to https://apple.stackexchange.com/q/137047/21473 https://apple.stackexchange.com/q/137047/21473 ‘Don't want iBooks to always paste the “Excerpt From” of what I have copied’. I recommend the solution in https://apple.stackexchange.com/a/382603/21473 https://apple.stackexchange.com/a/382603/21473 (which is an improved variant of stassats’s solution in https://news.ycombinator.com/item?id=22355322 https://news.ycombinator.com/item?id=22355322). The method is to use Automator to set up a Quick Action that copies the text while bypassing the clipboard-modifying behavior of Books. Then you configure a keyboard shortcut of ⌘C for the Quick Action, only in the Books app, so you don’t have to change the way you copy.
- 7y ago
- eitland 7y agoThis is bad UX if nothing else. For an example of what I think wad good UX: In Windows, it used to be that pasting into a text editor would give you the original text while pasting into OneNote would magically give you the text with a link back to the source below. I used to love that and for what I know it still works, I just don't use Windows and OneNote that much anymore.
- userbinator 7y agoIE (but not Edge, not surprisingly...) actually has a built-in feature which was probably specifically designed to target such things: https://i.stack.imgur.com/855az.png https://i.stack.imgur.com/855az.png Selecting "prompt" will result in this: https://i.stack.imgur.com/jvDUh.png https://i.stack.imgur.com/jvDUh.png I set it to Prompt for trusted sites, and Disabled for all others.
- alkonaut 7y agoReading the clipboard is a security risk. Reading the clipboard without having a user initiated paste seems like it shouldn't ever be possible (not suere whether that is what the option does). In this case, what I'd like as a user option is to be able to say "Don't copy via app-specific code", i.e. "don't run the js event to let the page populate the clipboard, instead inspect the selection and if there is a text selection then copy that as plaintext, else copy nothing". An alternative "prompt when the app tries to subscribe to the copy event" could also work. If I select a shape in an online diagram editor and the app says "can I please put my app-specific markup on the clipboard" then I say yes, because I understand there is now way copy paste works otherwise. And on a page when I have text selected, I can say no, and I get the default plaintext copy. Some apps have this as 2 different functions for a formatted copy/paste vs. raw text copy paste. If browsers had a "copy text" context menu item that copied the raw selection without invoking the js 'copy' event, that would work too.
- dawnerd 7y agoI had to implement an in-house version of this way back on eHow before it was pretty easy. Cross browser issues made it pretty tricky - which is probably why a couple companies that just did this spawned from it. It's all so silly and doesn't increase site visits in any meaningful way. Sidenote: I'm glad javascript in browsers is a lot more standard so you don't have to get stupidly hacky.
- brigandish 7y agoThis isn't just the web, there's a fundamental leakiness to the Mac's clipboard. I was horrified to realise that apps were being alerted to what was on the clipboard when I copied a a public key from some website and MacGPG (or whichever GPG app it was, they change) popped its head up and told me (something like) "Hi, you've copied a public key, would you like to save it in your keyring?" Does this mean that any currently running app (or maybe not even currently running, perhaps there's an event system) can see my clipboard? My feeling about this is unprintable. I started planning a clipboard app that doesn't allow this but I'm busy and I'd prefer this wasn't something I need to fix in the first place.
- ma2rten 7y agoI believe that the clipboard on windows and in x-server work the same way. Programs can also read most files including files that contain private keys.
- brigandish 7y agoI really care about security and lament that most people don't, but maybe they've the right idea and I'm just wasting my time. There are simply too many holes to plug :/
- mattkrause 7y agoHow do you want the clipboard to work then? To my mind, the whole point is to provide a way to move information within and between applications.
- jakear 7y agoWould it be so hard to say “when I press command-v, send a paste event to the focused window containing my clipboard contents”? Sure some programs would want to customize keybindings, so unrestricted access could be allowed on a per-app basis, but why should any app I install have access to all of my copy events ever? Similarly for private files: MacOS already alerts you when something tries to read from “~/Desktop” for the first time, why not allow users to extend that to “~/.ssh” and “~/.gpg” too?
- crazygringo 7y agoSeriously... I want to know the business/legal logic behind adding copyright messages to the clipboard when copying. This has happened for a long time with news sites, Apple Books, etc. No user ever has ever wanted that. So what lawyers, where, ever demanded it, and why? Short snippets fall under fair use anyways... and even if it didn't such a message doesn't prevent anything (you just delete it after pasting)... and it you were oblivious to how copyrights worked before, this isn't going to teach you. So it's UX annoyance but why? Not only does it not provide an obvious legal benefit to any party, I don't even see how it's legally covering anyone's ass? Like, I know how under trademark law companies have to warn people against using their trademark generically or else they can lose it -- so as dumb as it is to get an e-mail from Adobe asking you not to use "Photoshop" as a verb in your press release, I get it. But copyright... doesn't work like that. So how/why did this become a thing? I just don't understand the legal rationale here.
- CM30 7y agoIt wasn't about copyright or fair use, at least not directly. The intended purpose of this sort of code was to: 1. Make sure many people who shared content from your site would link back to the source 2. Track shares where the full link to the page wasn't copied 3. Trick scrapers/careless plagiarists into linking back to the original source, using their own carelessness to get an extra backlink or two (and tell Google your site was the original). All of these obviously only worked on people that didn't check what they were copying, but hey, those were some of the reasons behind it.
- pbhjpbhj 7y agoIt's just advertising surely, like Apple's insistence on "sent from my iPhone" type footers, annoyance is the point.
- otterley 7y agoAttorney here! (Not legal advice; consult a licensed attorney in your jurisdiction.) I am skeptical that this is a copyright issue that raised an attorney's attention. It's far more likely IMO that this was a contractual obligation imposed by the publisher. I have no insider knowledge as to whether this is actually true, but it's quite probable that in exchange for allowing Apple Books to republish their content, the publisher required Apple to append this attribution when copying content into the clipboard. In theory, preserving such an attribution might cause more copies to be sold. Also, contrary to your assertion, not every short snippet qualifies for a Fair Use defense; there's a four-factor test that courts apply, and the length is just one of those factors. But again, I think this less to do with copyright and more to do with a business arrangement.
- timzaman 7y agoThe author sadly didn't touch on e.g. zero-width spaces (https://en.m.wikipedia.org/wiki/Zero-width_space https://en.m.wikipedia.org/wiki/Zero-width_space) to fingerprint anything copy pasted.
- TheRealDunkirk 7y agoThere's a Safari extension called StopTheMadness that prevents this sort of thing. I just tested it on this page, and it does indeed stop this particular nonsense.
- jiggawatts 7y agoI can read & write a language that I don't have a keyboard for (I use a standard US 101 key layout), so I work around this by cut & pasting single characters around to fix up the missing accent characters. Usually even a partially fixed word is enough for the spell checker to kick in and correct the rest, making this surprisingly fast. The thing that annoyed me recently is that if I cut & paste a single character in Google Mail, it'll "helpfully" surround it with spaces when pasted. Other applications like Firefox or MS Word don't have this behaviour. I just tested it, and the GMail behaviour is wonderfully inconsistent: Copying from GMail to to plain text (e.g.: a text editor) will result in a single character. Copying from plain text into GMail will result in no superfluous spaces. Copying from GMail to GMail or to any "rich text" editor will add the extra spaces. So basically I'm copying plain-text, but GMail is abusing rich-text formatting to add "magic" behaviour someone at Google assumed is beneficial, but is just confusing and arbitrary. PS: Similarly, GMail's spell checker now "fights" with the Firefox spellchecker and the result is that neither wins and obvious typos aren't resolved unless I turn checking off and back on a couple of times.
- jariel 7y agoMy bet is that there simply is no standard for anyone to adhere to at Google. It's a rather granular and specific artifact of UI, in a company not necessarily known for it's UI prowess or consistency, at least along that vector. I'm wondering if some of these issues could be resolved with some solid industry standards.
- jakear 7y agoYou’d think “when a user selects text and runs the copy command, that text should be written to the user’s clipboard” would be a solid enough industry standard.
- ripexz 7y agoI've gotten into the habit of "pasting as plain text", i.e. cmd/ctrl+shift+v for any rich text editor.
- bmn__ 7y ago
- the_d00d 7y agoJust wait until they place an ad in your clipboard
- TeMPOraL 7y agoThis already is an ad. They're betting on you pasting what you copied straight into a communicator.
- gcb0 7y agoTo anyone that wants the short term solution, for this and other browser issues: https://github.com/pyllyukko/user.js/ https://github.com/pyllyukko/user.js/ 1. use firefox, a browser that sold you just like chrome and safari, but at least kept the settings around. 2. use user.js above, which is a pretty crazy restrictive default, and then opt-in the features you need as you miss them. (it's just commenting out one line, no voodoo)
- superkuh 7y agoYou're giving sites permission to do this when you browse the web with browser that automatically executes whatever code it is sent. They're not forcing you, you're going there and you're asking for it and doing it yourself. There's an easy solution. Stop. Don't run JS by default.
- harikb 7y agoOP is simply asking for a compromise, a better solution that yours. Instead of avoiding JS altogether, don’t give it access to things it should never have access / no business mucking around
- TeMPOraL 7y agoThere's a tension here, though. Having access to things like this is the whole point of having JS in the first place. The web is just full of assholes, so you experience the abuse as often - or even more often - than the proper use of JS. Not sure how to approach it. JS whitelist is a stopgap solution, but not a particularly convenient one, and it doesn't always work.
- anigbrowl 7y ago- This bathtub has a hole in it - Just throw it and the baby away, problem solved
- superkuh 7y agoIt's not the first time this would be required and done. You probably remember Flash. Once Flash was kicked out Javascript took over it's duties. Only you can't just simply block all JS or expect sites to work without it. JS is worse than Flash now.
- anigbrowl 7y agoI do think some of the ways that js is being abused now are worse than how flash was being abused, but when you get down to it abusive behavior by website owners (and most often, by their marketing departments) is independent of programming languages. It's a business culture problem rather than some flaw in the language design. If everyone stopped using js tomorrow you'd still have people abusing CSS or HTML or the English language to try to undermine or trick people in various ways. It seems to me that we should be directing our efforts towards better browser/OS design and/or more ethical business practices than in largely futile campaigns to make people give up functionality. I'm reminded of some local activists who campaign tirelessly with posters and graffiti to have people stop driving so as to reduce fossil fuel consumption; even though I agree with them and don't drive myself, just telling people to stop is not very helpful without addressing the question of how to solve the problems that people use vehicles for in the first place.
- bmn__ 7y agoRelated: http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard http://kb.mozillazine.org/Granting_JavaScript_access_to_the_... https://addons.mozilla.org/firefox/addon/don-t-fuck-with-paste/ https://addons.mozilla.org/firefox/addon/don-t-fuck-with-pas...
- 112 7y agoIt's fine. This is just stupidity dressed as on-purpose bad UX. Yes, I consider whoever makes that decision ("Yeah, we should totally make it not do what the user wanted it to do!") utterly stupid, and a sad presence in the gene pool. There are file management apps, graphic design apps (figma), etc., that use both the clipboard and the <c-c> / <c-p> binds to work. Neither blocking the bind of <c-c> events, nor of the clipboard are going to happen. We all have different needs and different pains. Sure, around here, we care about user experience, privacy, performance and optimizations, but let's not forget that we're in a bubble. The regular less-powered users are just as important as us, and their needs may outweight ours. I wish there was truly open browser that was not crap, there isn't. I wish better privacy controls were available out-of-the box. I wish there could be a feature matrix backed by a default profile so that I can only give access to the clipboard / other APIs manually, but with a prompt on access attempt. I wish so much. If I don't like my job runner, or my window manager, or even my password manager, I can go ahead and try with at least moderate success to make my own. Browsers are made by large groups of competent (most of them) polyglots, that work countless hours, willing to drill through the shit that has accumulated over the years into what we call the web. I don't have what's required to make my own browser.
- zzo38computer 7y agoYour stuff is my opinions too. It is difficult. WWW is a mess. There are other protocols and file formats which be used, which can sometimes be better depending on what you are doing, such as IRC, NNTP, Gopher, Telnet, SSH, etc. (And if that isn't good enough, you can make available something with multiple interfaces, in case some users prefer the web interface and some don't like it.)
- hoangbkit 7y agoAwesome post! many times i copied some stuff and they appended links and advertising contents into it ^^ so annoying, especially in those listing sites like quotes or similar.
- pgt 7y agoUpvoted for the emdash (—) shortcut: Shift+Option+Minus
- flarg 7y agoThere's an extension that stops this and it's called Don't Fk with Paste
- hartator 7y agoAlso special place in hell for pages that disables paste on their inputs.
- onion-soup 7y agoWhat's with ultra-grey font colors? It's not 2010 anymore, give your text some contrast ffs, you are killing my eyes
- otras 7y agoSorry about that. I had been using some default styles that came with the Hugo theme I'm using, but I absolutely see what you mean. Updated text throughout the site to have better contrast. Hope that helps!
- onion-soup 7y agoThanks!
- thanhkitt 7y ago“ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan,
- kebman 7y agoHindering someone from grabbing an emdash with copy-scripts is pretty petty. Edit: Anyway, reminds me when I used to troll my buddies with the ANSI.SYS hack.
- sleavey 7y agoFurthermore don't touch my ability to paste into web forms. Some banks do this, and I have no idea why (some incredibly misguided idea of security?). I disabled the ability for websites to disable pasting using Firefox's about:config, but 99.9% of users won't know they can do this.
- Moeancurly 7y ago> I disabled the ability for websites to disable pasting using Firefox's about:config, but 99.9% of users won't know they can do this. Have you encountered any unintended consequences from disabling this?
- sleavey 7y agoNone whatsoever. I've had it disabled for about two years.
- reciprocity 7y agoThe consequences of dom.event.clipboardevents.enabled;false mostly results in errors of functionality with WordPress, Google Docs, and Facebook (but I suspect FB has other motivations/reasons for this). You might encounter errors with other WYSIWYG editors, but for the most part, it's a nice optional feature to have control over.
- deadbunny 7y agoDo you know the key for this? Can't find it with a quick search.
- ernie24 7y agoCredit where credit's due, the mentioned website (The Punctuation Guide) works very well with JS disabled, and the problem with text copying is gone. I use https://github.com/meetDeveloper/Quick-JS-Switcher https://github.com/meetDeveloper/Quick-JS-Switcher