You can make unselectable text on a webpage selectable by going into the browser inspector and disabling any "user-select" or similar CSS property. You can also inject a "user-select: all" into the HTML element containing the text if you can't find which parent element has the "user-select: none".
You can also disable any right click blocking JavaScript or other user-hostile JavaScript in the browser inspector by running JavaScript code in the console to remove any HTML event listeners for right click (typically its oncontextmenu so just set "document.body.oncontextmenu" or "{element that has the property set}.oncontextmenu" to something like null or return true).
*The specific procedure will be slightly different for every site because it is written differently.
Sometimes sites have code that triggers in debug mode and keeps it in a loop. Any tips there, or is the "break and modify source to remove it" the only way?
One should be able to put code for both removing listeners and adding the CSS override into a bookmarked. That will not trigger the anti-debugging crap.
This somehow breaks text selection for me (just selects all text). Here are some useful bookmarklets including a working one to enable right-click and text selection: https://github.com/alanhogan/bookmarklets
Superfluous. I don’t understand why people often do this on stylesheets or scripts (type="text/javascript"), because it has never at any time been necessary or useful.
You don't need any third party tools for this any more, OCR is now built in to the Snipping Tool. Just press ctrl+shift+win+s, select the region of the screen you're interested in, then use the new "Copy all text" toolbar button. (Note that this is very new and might not be rolled out to everyone yet)
Maybe I should just run one then... some of Safari's privacy settings seem to trigger that "turn off your ad blocker to proceed" on several sites, many of which are frequently on duck duck go's front page for things I search.
archive.ph is usually a perfectly reasonable work-around if I want to read anyway, though.
I remember back in the day Howtogeek used to be a small site ran by a guy who wrote his own How-to tutorials because he was frustrated with the ones out there.
My guess is he probably sold the site at some point
You're definitely not alone in not knowing this, I have to explain to like 95% of people that this works, is faster, and vastly preferrably over sending me screenshots (or pictures taken by phone) of error dialogs. In their defense: the only way to discover it is word of mouth or just trying it (which I did once). Similar with copying text from terminals.
And a lot of other things which makes using a computer more convenient actually. Especially for the younger generation I have the impression (anecdotally) they lack this "let's find out if I can do this faster/better" mindset. Like: my mum knows basics text stuff on windows like doubleclicking a word selects it, triple clicking selects line/paragraph, ctrl+cursor moves around words and so on. Meanwhile it's painful to see how many people in their twenties only know how to select text by moving the cursor to where they want, clicking and holding, then hunting for the last character and often missing it. I assume the main reason for this is more smartphone/tablet usage, less desktop.
I did discover it back in the day by accident, and it must've been Windows 2000 or earlier. Very confused where that came from at first, as it clearly was the contents of some generic message box, but it made no sense why it was in my clipboard in text form. Then I was like "wait a minute, they didn't...." And sure enough after triggering a random message somewhere and pressing ctrl-c I had that very message in my clipboard. Immediately had to tell everybody about it in excitement; nobody knew. Though I remember there being long lines of dashes as separators between the sections instead of those [Title] headings. (Not on Windows anymore for a decade now, so memory is foggy).
"Search Image with Google" is now available on right-click in the chrome browser.
You could screenshot -> open JPG in chrome --> and OCR the text.
Takes more clicks than needed but serves me in a pinch currently.
If I am attending a webex/zoom or watching a youtube video that merely "shows" a URL or other text content without offering that to me as copyable text -- this method helps.
Ideally this OCR ability should be a native OS functionality available universally on right-click. Maybe soon.
Person doing the presentation might expect that the link gets shared with specific audience; now it is most probably indexed by Google and publicly searchable.
This drives me up the wall on Android, don't use Windows.
I like to feel that I actually own and control my powerful general purpose computer. Instead I've got a phone that's good for reading HN and not much else.
There shouldn't have to be a discussion on HN on how to select arbitrary text.
Oh god, and it's everywhere. Literally would use the YouTube app every now and then with ads to support creators, but being unable to copy video titles, descriptions and comments drive me nuts! Just add "long-press is copy" ffs.
So I guess they want me to keep using the browser version in Firefox with blocked ads.
"We are displaying you text that was served to/stored by our program as text, but we won't let you use it as text, unless you jump through the hoop of ocring it"
I have tried using this feature and found it to be surprisingly lousy. It recognizes the area but can't reliably recognize the text. It's been especially unreliable with random strings of numbers (credit card numbers, phone numbers). Maybe it's better with paragraphs of words, but I've even found it to be pretty so-so for that use case.
Interesting, I've found it to be surprisingly good at random alphanumeric strings, and I use it often for copying teensy model and serial numbers off device stickers.
I’ve personally found the opposite. It absolutely blows me away how good it is, even on crazy graphical fonts or other languages etc. I use it pretty much every single day now.
And if you do take a photo, it’s as good as having saved a text file of whatever you captured. Handy not only for printed docs but also for pulling text from screens you wouldn’t normally be able to copy+paste from.
On a related note, I recently discovered that the MacOS video player lets you select and copy text from any video you're watching. It's ridiculously cool. I wonder how it works though.
Yes, Apple calls this “Live text”. It is also available on iOS (I think since iOS 15?). You can copy text from photos or videos right from the Photos app.
Honestly microsoft needs to figure out how to copy copyable text in all of their apps. For some reason I always end up with the least intuitive paste when copying text from teams/one note/office but this article does at least help with error messages. Not sure why you can’t just copy it like everything else though.
xfce4-screenshooter, the default on Xubuntu, has the ability to open it with a program. So download any OCR program in Linux,say tesseract.
Make a script
tesseract $1 | xclip -sel c
save it as scrocr
And choose this program in xfce4-screenshooter, it'll remember it for next time, keeping the drop-down menu short.
This one copies to clipboard, if you want to view it first, then pipe it to `zenity` or `yad` instead of xclip, one of which im pretty sure is pre-installed in ubuntu. And you can copy it out of there normally after checking it.
If you use gnome etc and not xfce, check comparable options in gnome screenshot tool
You can also disable any right click blocking JavaScript or other user-hostile JavaScript in the browser inspector by running JavaScript code in the console to remove any HTML event listeners for right click (typically its oncontextmenu so just set "document.body.oncontextmenu" or "{element that has the property set}.oncontextmenu" to something like null or return true).
*The specific procedure will be slightly different for every site because it is written differently.