Make more online, for less. Buy a domain and everything else you need.
While I was writing about the Dungeons & Dragons stamp, I discovered—for reasons unknown, and much to my annoyance—that the USPS Postal Store prevents you from copying text from its website.
This annoys me on any website, but for a government-run agency, it seems like an especially misguided idea. Heck, it might even be disallowed under Section 105 of the Copyright Law of the United States (Title 17), which says
Copyright protection under this title is not available for any work of the United States Government….
This suggests there should be no reason they’d prevent copying. More broadly though, I don’t understand the desire for any website to block this basic functionality. It’s user hostile. Anyone motivated enough to copy stuff will find ways of doing so, even if it means retyping it, screenshotting it, or, as any self-respecting geek would do, finding a technical workaround to the problem.
First, let me acknowledge that the effort I put into addressing this issue, while minimal, was still greater than simply retyping the text from the site, or taking a screenshot and copying the text that way. The effort, of course, is beside the point for us geeks. It’s the principle of the matter. Information wants to be free, and I’ll be damned if I can’t copy text on my own computer!
Fortunately, USPS.com made this easy on me by using a method to prevent copying that’s easily worked around: The user-select
CSS property.
I assume you know at least the basics of CSS. If not, I recommend reading this primer, but very briefly, CSS lets you style how content looks on a website, and how people interact with it. A style sheet contains the definitions, or instructions, for that styling. One of the features of CSS is you can override styles by providing new definitions. Safari provides a mechanism to add your own styles to all websites. I’ll use that ability to override the USPS.com user-select
definition with my own.
(Note: This is Mac- and Safari-specific. There are ways of doing this in other browsers, and on Windows/Android, but I don’t use them.)
First, I’ll create a new style sheet that disables the relevant property. Then, I’ll tell Safari to use it. Finally, I’ll reload the page and copy copy copy!
Create a style sheet. user-select
tells browsers how to handle content selection. USPS.com sets it to none
, preventing any content selection. I want that to be auto
(the browser default) which allows selecting—and thus copying—content. I need the !important
flag so the browser gives my new definition a higher priority than the one coming from the website. Finally, I want this to apply to everything on the page, so I’ll use *
instead of a specific HTML tag, class, or identifier.
I created a file, which I called nof—you.css
, with the following content:
* {
-webkit-user-select: auto !important;
user-select: auto !important;
}
(Surprisingly, user-select
is not a web standard yet, so most browsers prefix it to indicate it’s a browser-specific implementation. -webkit-user-select
is for Safari’s current implementation, and user-select
is for when the property (eventually) becomes a standard. Other prefixes exist, such as -moz-user-select
and -ms-user-select
, but again, I care only about Safari.)
Tell Safari to use this style sheet. In Safari, I opened Settings, then the Advanced tab. I clicked on the Style Sheet popup menu and selected Other…, and chose my nof—you.css
file. Safari will now use this css on any website I load.
Reload the page. After reloading the USPS Store page, I’m now able to select and copy the text.
What’s great about this solution is it works for any site that uses user-select
. I can either leave the CSS file always enabled (so I won’t even notice that a site was blocking selection); or I can disable it (select None from the Style Sheet popup) and re-enable it when necessary.
I think I’ll do the latter so I can emphatically spit out F— me? No, f– you! as I enable it.
Bonus Screenshot Option: I mentioned above taking a screenshot as a way to get around copy blocking. Here’s a brief overview of how you do that. (Again, this is only for Apple systems.) Take a screenshot on your Mac, iPhone or iPad, or take a photo with the Camera. In Photos, use the Live Text feature to select and copy the text. Voila. It still feels like getting away with something, but ultimately, gives me a less visceral f—you! experience.
Your mileage may vary.