HACKER Q&A
📣 markus_zhang

Why it is difficult to copy strings from web pages?


Maybe it is just me being delusional, but I found it more and more difficult to copy strings, especially substrings from web pages.

Example:

Click this link (https://github.com/torvalds/linux/pull/1115/files#diff-821e5c0c63b06b94e7d7a562e03e7b0c6c633b21f0e0ef82c9c9e80a1df4b304) and tries to copy "namespace" from the "ipc/namespace.c". I couldn't do it.

Yes I know there is a "Copy" button to the right side of it -- but I don't want the whole path. Plus, the real issue is not with the Linux repo, because most of its filenames are short anyway, but with my work repos, where you can get "dir1/dir2/abc_def_ghy.yaml", and I only want the "abc_def_ghy" part.

I think the problem is that -- there are too many clickable items on web pages nowadays. If it's clickable, users can't click in the middle without opening something.

What do you think? This has been a constant minor frustration for me for a long time.


  👤 solardev Accepted Answer ✓
In Chrome on macOS, you can hold down the OPT key to more easily drag-select the "namespace" part without triggering the link or drag-and-drop.

👤 deveesh_shetty
Well, you can just go hacker mode, press Ctrl + Shift + I, point the element, and copy the text from the HTML tag.

Nonetheless, a valid concern.


👤 tolciho
The way too long link was not "clickable", so I had to copy and paste it and remove some whitespace. However, the text "namespace" was quite easy to select, as the terminal makes selecting text easy (not all terminals are so well designed, but I tend to avoid such terminals) so there is no "clicking" as a mouse jockey might understand it. The modern web with a modern browser? That's been bad for years, maybe closing in on two decades. Too many geegaws that are at best useless distractions and at worst actively hinder useful things, such as selecting text from a page. Maybe there needs to be a "kill the links and javascript and CSS" mode, something like the reader mode I've heard about?

For github I usually clone the repository and have at it with cli tools, for anything more involved than "page around trying to find the README text placed helpfully somewhere towards the bottom of the page that may describe what the repository is about". Command line tools generally have a lower enshittification rate than the modern web, though I have heard stories about ads being added to certain linux tools. There are no technical reasons why pop-ups and annoying animations couldn't be added to a modern terminal program, and maybe even selecting text can be made difficult by making everything mouseable, for those of you who haven't compiled mouse support out of your terminal.